How to do to display() appear as last thing
1 view (last 30 days)
Show older comments
João Castro
on 25 Sep 2015
Answered: Image Analyst
on 26 Sep 2015
Hi, I've made a script that have some outputs and as my last sentence in this script I have:
disp(sprintf('Advice:'))
display(orderM1,'Order_model1');
display(orderM2,'Order_model2');
I want the answer to the above code appear as the last thing and not at first.
Thanks!
1 Comment
Walter Roberson
on 25 Sep 2015
You should not be calling display() directly; you should be using disp(). Unless, that is, display() is your own routine that is not intended to be a class method invocation.
I am not sure what the "answer to the above code" is?
Accepted Answer
Image Analyst
on 26 Sep 2015
Instead of using disp(), sprintf(), and display() (whatever that is), just use fprintf():
fprintf('Advice:\nOrder_model1 = %f\n%Order_model2 = %f\n',Order_model1, Order_model2);
0 Comments
More Answers (0)
See Also
Categories
Find more on Line Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!