Syntax for Displaying Units

G = 6.673*10^.11;
GRAVFORCE = (G*massbod1*massbod2)/planrad^.2;
%Provide user output
disp(['THE (body1) EXERTS A FORCE ON (body2) OF: ' , num2str(GRAVFORCE)])
disp('')
The variables have been input by the user and this is the end of my script... How can I get it to output Nm^2/kg^2?

1 comentario

Geoff Hayes
Geoff Hayes el 1 de Feb. de 2015
Jorge - what exactly do you want to output? The string 'Nm^2/kg^2' as
disp(['THE (body1) EXERTS A FORCE ON (body2) OF: ' num2str(GRAVFORCE) ' Nm^2/kg^2'])
or something else?

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Preguntada:

el 30 de En. de 2015

Comentada:

el 1 de Feb. de 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by