How do I use either "printf()" or "mexPrintf()" when either call gets me "Unknown function or variable"?
11 次查看(过去 30 天)
显示 更早的评论
I am new to Matlab on a Mac, having used Matlab and Octave in Linux environments for years. I find
that I cannot use "printf" or what I see described as "mexPrintf" to show variables in the command line window.
I get the error message "Unknkown function or variable". Is there some path addition that I need to do in order
that this Matlab see all the available functions? Or are these functions considered beyond the reasonable need
of a "home" user of Matlab?
2 个评论
采纳的回答
James Tursa
2018-11-19
Typically use disp( ) or display( ) or fprintf( ) to display variables in the command window.
2 个评论
James Tursa
2018-11-20
If you supply a file I/O parameter as the 1st argument, fprintf also writes to files.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!