Create a single MATLAB statement that will print pi to 4 dec

Create a single MATLAB statement that will print pi to 4 decimal places.

Solution

When you donot specify any condition, the pi value will be taken as

pi

To obtain only 4 digits after the decimal point

Set the output format to the short engineering format with compact line spacing

format shortEng

pi

Ans =

3.1415e+000

 Create a single MATLAB statement that will print pi to 4 decimal places.SolutionWhen you donot specify any condition, the pi value will be taken as pi To obtai

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site