MATLAB Onramp course error

I am running the MATLAB Onramp but it stalls at 11.1 The MATLAB Editor: (2/2) Practice, (71%)
The error is "There was an issue communicating to the MATLAB compute resource". Execution halts at the same place every time.

5 commentaires

Anushka Tilekar
Anushka Tilekar le 19 Mai 2020
Is the MATLAB Onramp course available free of cost ? Will I get a certificate of completion after finishing it ?
Walter Roberson
Walter Roberson le 19 Mai 2020
Yes, and Yes.
Ishaan Davariya
Ishaan Davariya le 10 Oct 2021
I am facing the Same problem!!
SIRAJ
SIRAJ le 6 Août 2022
its does had any solution plz share it...
Vishnu Sood
Vishnu Sood le 15 Oct 2022
delete all the previously typed code then copy and paste from sol. space

Connectez-vous pour commenter.

Réponses (4)

Richard Chukwu
Richard Chukwu le 5 Juin 2019

2 votes

Same with me. I'm on the fundamentals and I get this error at intervals. Even though my connection is okay.

2 commentaires

Laura Jones
Laura Jones le 15 Fév 2021
I think those features must be broken and no one is bothering to fix them because the course is free.
SIRAJ
SIRAJ le 6 Août 2022
frds one solution i got it first delete all initial lines see the solution then type it u definitely get crt answer try it...

Connectez-vous pour commenter.

Mark Oliver
Mark Oliver le 5 Juin 2019

1 vote

I restarted my computer and never had the issue again.
KANISH THAKUR
KANISH THAKUR le 10 Juin 2020

1 vote

don't use "..." after "element", after finishing the term inside the bracket close it by using semi colon.

1 commentaire

yes great ; thank you friend , its ok new
if doPlot
plot(density)
title("Sample Densities")
xticklabels(element)
ylabel("Density (g/cm^3)")
else
disp("The density of " + element + " is " + density);
end

Connectez-vous pour commenter.

KAMLESH SINGH
KAMLESH SINGH le 30 Avr 2020
Modifié(e) : Walter Roberson le 16 Fév 2021

0 votes

x = rand
if x > 0.5
y = 3
else
y = 4
end
TASKModify the script so that when the if condition is not satisfied, the following line of code is executed:
disp("The density of " + element ...
+ " is " + density)
Hint
See Solution
Reset
Submit
Hint
Modify the if statement to be an if-else statement.
In the else body, use the code as shown above.
Test Results:
Incorrect!----------------------------------------------Why the result is incorrect???? When the code written in Task 1&2 is correct
Are the densities displayed when doPlot is 0?
Are the densities not displayed when doPlot is 1?
Further Practice
WORKSPACE
COMMAND WINDOW
Decision Branching
Instructions are in the task pane to the left. Complete and submit each task one at a time.
Do not edit. This code creates a random number to test the if statement.
doPlot = randi([0 1])
This code loads the data.
load datafile
density = data(:,1);
Task 1 & 2
if doPlot
plot(density)
title("Sample Densities")
xticklabels(element)
ylabel("Density (g/cm^3)")
else
disp("The density of" + element ....
+ "is" + density)
end
1
2
3
4
5
6
7
8
9
10
11
12
13
doPlot = 1
decisionBranching.mlx *

8 commentaires

ANUJ SINGH
ANUJ SINGH le 13 Mai 2020
What is the solutions of decison branching 13.1
rojin Arikan
rojin Arikan le 20 Mai 2020
I have this problem too can you help me?
mehdi benbraik
mehdi benbraik le 27 Mai 2020
i have the same problem, did you find a solution to this problem ?
Pooja Roy
Pooja Roy le 26 Sep 2020
I faced the same problem and my course remains incomplete because of that.
Laura Jones
Laura Jones le 15 Fév 2021
I am unable to complete the course because it hangs in all of the project segments after the first few tasks.
Thabiso Johannes Khune
Thabiso Johannes Khune le 6 Août 2021
Modifié(e) : Walter Roberson le 6 Août 2022
if doPlot
plot(density)
title("Sample Densities")
xticklabels(element)
ylabel("Density (g/cm^3)")
else
disp("The density of " + element + " is " + density);
end
Walter Roberson
Walter Roberson le 6 Août 2022
If you are doing the same task as some other people have posted, then you are not supposed to do those lines unless doPlot is 1 . Your code is doing the lines if doPlot is non-zero. For example if doPlot were 2 then the task would require that the lines not be executed.
GUDIPATI SRINIVASULU
GUDIPATI SRINIVASULU le 22 Sep 2024
  1. if doPlot ==1
  2. plot (density)
  3. title("sample Densities")
  4. xlabel("Element")
  5. ylabel("Density (g/cm^3.")
  6. else
  7. disp("The density of " + element +"is"+num2str(density) + " g/cm^3.");
  8. end

Connectez-vous pour commenter.

Catégories

En savoir plus sur Get Started with MATLAB dans Centre d'aide et File Exchange

Commenté :

le 9 Sep 2025

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by