fprintf function is not defined for 'sym' inputs error
Mostrar comentarios más antiguos
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!
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Operations on Strings en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!