Question: write a function to create a vector x is from 2 to 4.5 (2 x 4.5) with incremental value 0.5, vector y = [x; x.^3],
- write a function to create a vector x is from 2 to 4.5 (2 x 4.5) with incremental value 0.5, vector y = [x; x.^3], then save matrix y into a text file ex1-p4.txt, so that in this text file,
- value x is formatted with decimal notation, and keep two digits after decimal point;
- value x.^3 will displayed with exponential notation and keep three digits after decimal points;
- each line only displays one x and x.^3, there is three spaces between x and x.^3
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
