MATLAB Answers

Decision Branching Error in matlab onramp

52 ビュー (過去 30 日間)
Girish Karikatti
Girish Karikatti 2019 年 12 月 2 日
Commented: Damilola Adeniji 2019 年 12 月 18 日
How to crack this error? The input data and solution provided by the matlab sources are same still the error is occuring.

  0 件のコメント

サインイン to comment.

採用された回答

Steven Lord
Steven Lord 2019 年 12 月 2 日
That might be checking that the densities that are printed as text when doPlot is 0 exactly match the densities that would be printed by "the code as shown above". The code you're using doesn't exactly match: note that your code doesn't display a space between "of" and the name of the element. Try adding the spacing before and after the element name (as I believe "the code as shown above" does) and see if that allows you to pass the test case.

  4 件のコメント

表示 1 件の古いコメント
Damilola Adeniji
Damilola Adeniji 2019 年 12 月 17 日
Hello Girish
Please share the solution for this code.
As i'm currently stuck at this stage.
Thanks
Steven Lord
Steven Lord 2019 年 12 月 17 日
Compare:
x = 1;
y = 2;
disp("The value of x is" + x + "and the value of y is" + y)
disp("The value of x is " + x + " and the value of y is " + y)
The two phrases displayed are not identical. If your code displayed the first of those phrases but the exercise expected the second your code would not pass the test.
Damilola Adeniji
Damilola Adeniji 2019 年 12 月 18 日
Hi Steve
Thanks for the quick response.
Even after following the phrase is still saying incorrect.
thanks.
Capture.PNG

サインイン to comment.

More Answers (0)

サインイン してこの質問に回答します。

タグ

製品


リリース

R2019b

Translated by