Invalid escape sequence appears in format string. See help sprintf for valid escape sequences
10 次查看(过去 30 天)
显示 更早的评论
Abhinav Prashant Mohanakrishnan
2013-11-11
评论: Abhinav Prashant Mohanakrishnan
2013-11-11
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 个评论
采纳的回答
Image Analyst
2013-11-11
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))
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Argument Definitions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!