Why does my matlab function produce result more than I expect?
1 次查看(过去 30 天)
显示 更早的评论
Please see the attached pdf file for the issue. Thanks!
0 个评论
采纳的回答
更多回答(1 个)
Stephen23
2016-1-10
编辑:Stephen23
2016-1-11
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!