(Solved) : 28 Chapter 1 Short Introduction Matlab Exercise 14 Issue Command Doc Fprintf Matlab Learn Q44082967 . . .
Usematlab28 Chapter 1. A Short Introduction to Matlab Exercise 1.4 Issue the command doc fprintf in Matlab to learn more about fprintf and then complete the following practice. (1) Display the Matlab value of z such that your output looks as (Hint: Use %16.14f): The Matlab value of pi = 3.14159265358979 (2) Display the Matlab value of e (given by exp(1)) such that your output looks as: The Matlab value of e = 2.71828182845905 (3) Display the value of the universal gravitational constant G = 6.674 x 10-“(m²kg-!s-2 such that your output looks as (Hint: Use %5.3e or %g): The universal gravitational constant G 6.67e-11 m 3/kg/s 2 (4) Generate a table of values by: x = 0:.1:1; A = [x; exp(x); log(x+1)] Then save the table to a file named ‘mytable.txt’ using fprintf. Open your file and check if it stores the table as you want. Show transcribed image text 28 Chapter 1. A Short Introduction to Matlab Exercise 1.4 Issue the command doc fprintf in Matlab to learn more about fprintf and then complete the following practice. (1) Display the Matlab value of z such that your output looks as (Hint: Use %16.14f): The Matlab value of pi = 3.14159265358979 (2) Display the Matlab value of e (given by exp(1)) such that your output looks as: The Matlab value of e = 2.71828182845905 (3) Display the value of the universal gravitational constant G = 6.674 x 10-“(m²kg-!s-2 such that your output looks as (Hint: Use %5.3e or %g): The universal gravitational constant G 6.67e-11 m 3/kg/s 2 (4) Generate a table of values by: x = 0:.1:1; A = [x; exp(x); log(x+1)] Then save the table to a file named ‘mytable.txt’ using fprintf. Open your file and check if it stores the table as you want.
Expert Answer
Answer to 28 Chapter 1. A Short Introduction to Matlab Exercise 1.4 Issue the command doc fprintf in Matlab to learn more about fp…
OR