How to use Num2str?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Tran Hoa
am 26 Mai 2018
Kommentiert: Majid Farzaneh
am 26 Mai 2018
Hi,
I have researched Matlab. When I use Num2str,
disp (['Iteration ' num2str (it) ': Best cost = ' num2str (Bestcosts(it))]);
it happen a mistake
Error using num2str (line 41)
Not enough input arguments.
Please, help me solve this problem
Thank you
0 Kommentare
Akzeptierte Antwort
Majid Farzaneh
am 26 Mai 2018
Bearbeitet: Majid Farzaneh
am 26 Mai 2018
Hi, Don't use space between num2str and '('. This will work:
disp (['Iteration ' num2str(it) ': Best cost = ' num2str(Bestcosts(it))]);
5 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrices and Arrays 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!