Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. (15%) 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 =

4. (15%) 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, 1) value x is formatted with decimal notation, and keep two digits after decimal point; 2) value x.^3 will displayed with exponential notation and keep three digits after decimal points; 3) each line only displays one x and x.^3, there is three spaces between x and x.^3

5) (15%) In your function,

1) create a vector x for 0 to 2 with incremental value 0.1, and vector y1 and y2 such that:

y1 = sin(x) + 1;

y2 = sin(x + 2)image text in transcribed 1;

2) those 2 curves on the same plot, where y1s style is red color, data point is noted as +, and linked by dashed line - - '; and y2 style is green color, data point is symbolized with *, and linked by dotted line :.

3)Include a title of the plot (Problem 5). Label the x-, y-axes as X, Y, Save the plot

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

10-9 How have social technologies changed e-commerce?

Answered: 1 week ago