fprintf matrix question. Need help.
Mostrar comentarios más antiguos
Using the repeated feature of fprintf() function in MATLAB, your program must display the results in the following format:
The force in link (I)= XXXX.XX N
The force in link (I)= XXXX.XX N The force in link (-)= ------- N
-------------------------------
Where I refers to the link number (1-8) in format %i and XXXX.XX is the corresponding force value in that link in %g format.
Respuesta aceptada
Más respuestas (1)
Deepak Kumar
el 11 de Oct. de 2019
Please refer the below documentaion to understand the uses of fprintf function
Also, I have written the below code to print the value of
at the values x=1:8 using for loop. You can refer this code and make changes as per your requirements.
clc
clear all
for x=1:8
fprintf('The value in link(%d)=%4.2f N\n \n',x,exp(x))
end
Categorías
Más información sobre Mathematics 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!