Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help with #7 please in MATLAB Run your function to give result for each problem. 1. (12%) Calculate value of x 2. (13%) Create a

Help with #7 please in MATLAB image text in transcribed
image text in transcribed
Run your function to give result for each problem. 1. (12%) Calculate value of x 2. (13%) Create a vector v with 50 equally space element in which the first element is 93, the last element is 58. 1) What is the value of the 7 element of v? 2) What is the sum of all clement for vector v? 3. (15%) Create a function named "Problem3" that requires input and output. The input is x and y. The output is z. e.g., [z] - Problem.3(x,y). This function represents z=x/y- 2/x-xy. Find the value of z for x3.9 and y8.8. 4.(15%) write a function to create a vector x is from 2 to 4.5 (25x 34.5) with incremental value 0.5, vector y - x; X.3], then save matrix y into a text file 'ex l-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 2x with incremental value 0.1, and vector y1 and y2 such that: yl = sin(x)+1; y2 = sin(x +-1: 2) those 2 curves on the same plot, where yl's 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. 6.(15%) If OSX S2,0 Sy s 2x, z = sin( cos(x) + sin(y)) + 1; write function to generate 3D mesh plot by using 0.1 increment for x and y. Label the x, y, and z-axes as "X". "Y", and "Z." Include a title of the plot (Exam 1 - Problem 6). Save the plot as Problem 6. Hint: Use semicolons to prevent Matlab from showing the large matrices or vectors. 7.(15%) If the loaded data is a matrix form A, and Where 1 column is part number, 2 column is part density (kg/m), 3 column is part volume (m'). 1) Get a vector which has part density 2) Get a vector which has part volume 3) use above two vectors to calculate the mass for each sample Hint: Mass - (density) x (volume) 7. (15%) If the loaded data is a matrix form A, and A Where 1 column is part number, 2nd column is part density (kg/m'), 3 column is part volume (m'). 1) Get a vector which has part density 2) Get a vector which has part volume 3) use above two vectors to calculate the mass for each sample Hint: Mass = (density) x (volume)

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

Recommended Textbook for

MySQL/PHP Database Applications

Authors: Brad Bulger, Jay Greenspan, David Wall

2nd Edition

0764549634, 9780764549632

More Books

Students also viewed these Databases questions

Question

Conduct a needs assessment. page 269

Answered: 1 week ago