For the following questions z 100810 Write the MATLAB outpu

For the following questions, z = 100/810. Write the MATLAB output statement that displays z in the format shown in bold. DO NOT hard code the values, use the value stored in z to print each one. In each case, the >> by the letter in parentheses shows where your statement is typed. >> 0.1 >> 0.123 >> 1.235e-001 >> The value of z is 0.123. >> z is 0.123, so 10 z is 1.235.

Solution

z=100/810;

a) round(z,1)

b)round(z,3)

c) format short e

round(z,4(

d) format

fprintf(\' The value of z is %f\ \',round(z,3));

e) fprintf(\'z is %f , so 10 z is %f\',round(z,3),10*round(z,4))

 For the following questions, z = 100/810. Write the MATLAB output statement that displays z in the format shown in bold. DO NOT hard code the values, use the v

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site