Why does my matlab function produce result more than I expect?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Ben Le
am 10 Jan. 2016
Bearbeitet: Stephen23
am 11 Jan. 2016
Please see the attached pdf file for the issue. Thanks!
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Stephen23
am 10 Jan. 2016
Bearbeitet: Stephen23
am 11 Jan. 2016
Your function Testing has two outputs, and when you call the function the first output is displayed by default, unless you suffix the line with a semicolon. So instead of calling this:
Testing
you need to call this:
Testing;
Note that a function output is a totally different thing to the text that you are fprintf-ing in the command window: do not get confused between these.
3 Kommentare
Siehe auch
Kategorien
Mehr zu Testing Frameworks finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!