MATLAB: Decision Branching Error in matlab onramp

MATLAB

How to crack this error? The input data and solution provided by the matlab sources are same still the error is occuring.

Best Answer

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.