fprintf function is not defined for 'sym' inputs error
显示 更早的评论
This came up on a homework assignment for my ENGR Dynamics class. I'm a distance student and I use Matlab 2016a on my local machine but I think the school uses a previous version. Anyway, my code ran fine locally but after sending the .m file to my TA, he got an error on these lines:
fprintf('v = %3.3f m/s',double(v))
fprintf('\ns = %3.2f m\n\n',double(s))
I did some digging and I made this change:
fprintf('v = %3.3f m/s',double(v))
fprintf('\ns = %3.2f m\n\n',double(s))
Again, this runs fine on my machine. Since I got full credit on the problem, and it's not a Matlab course, and the TA is pretty overworked as it is, I'm reluctant to ask him to keep debugging the issue. I was hoping somebody here could shed some light on this?
Side note, I'm new to Matlab. So if there's a better function to use, I'd love to learn it!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Operations on Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!