MATLAB: I dont see an error error display num2str I dont see an error, but there is one? display([' Nif = 'num2str(Nif,'% 10.2f') ' [-]']); Best Answer I would strongly suggest you learn to use commas.display([' Nif = ',num2str(Nif,'% 10.2f'),' [-]'])They make your code more readable. They also make your code work. Related SolutionsMATLAB: How to save a series of variables in workspace to a txt file http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....2CA10_in_a_loop.3F MATLAB: How to use Num2str Hi, Don't use space between num2str and '('. This will work:disp (['Iteration ' num2str(it) ': Best cost = ' num2str(Bestcosts(it))]); Related QuestionHow to determine how a loop finishesQuaterions to string in matlabHow to generate sequenced file names with file extensionsDoes NUM2STR not return the correct string format that I specified
Best Answer