Invalid escape sequence appears in format string. See help sprintf for valid escape sequences
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Abhinav Prashant Mohanakrishnan
am 11 Nov. 2013
Kommentiert: Abhinav Prashant Mohanakrishnan
am 11 Nov. 2013
I have the following set of fprintf statements.
magnaxialA=(Elem(i).Q(1,1)/1000);
magnshearA=(Elem(i).Q(2,1))/1000;
magnmomentA=(Elem(i).Q(3,1))/1000;
fprintf('\n\tStart Node\n')
fprintf('\Axial Force %f kN\n',abs(magnaxialA))
fprintf('\Shear Force %f kN\n',abs(magnshearA))
fprintf('\Moment %f kN-m\n',abs(magnmomentA))
But I keep getting the error message Invalid escape sequence appears in format string. See help sprintf for valid escape sequences
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 11 Nov. 2013
Get rid of the first backslash since \A, \S, and \M are invalid.
fprintf('\n\tStart Node\n')
fprintf('Axial Force %f kN\n',abs(magnaxialA))
fprintf('Shear Force %f kN\n',abs(magnshearA))
fprintf('Moment %f kN-m\n',abs(magnmomentA))
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Cell 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!