Question: Code has to be written in MATLAB please. Thanks Part I 1. Implement this expression in MATLAB and calculate y for the following assigned values:

 Code has to be written in MATLAB please. Thanks Part I

Code has to be written in MATLAB please. Thanks

Part I 1. Implement this expression in MATLAB and calculate y for the following assigned values: P=4.3, v=0.012, r=2, and d=8.5. vd Y = 21" + r2p Please write MATLAB code to calculate the result and print the results in three formats, (1) short, (2) long, (3) short scientific, respectively. (10 pts) 2. Is the following value within an error of 0.02 with respect to 8.2? Please show why or why not using MATLAB code. (10 pts) V53 + 10 V8 -4 3. This problem consists of three parts. (a) Write MATLAB code to generate a row vector of values 0 to pi in increments of pi/20. (b) Write MATLAB code to generate a row vector of values 200 to 100 in decrements of 10. (c) Write MATLAB code to generate a row vector of 15 linearly equally spaced values between 1 and 8. (18 pts, 6 for each part) 4. The script below cannot run because of bugs (errors). Please retype the code into your M file and debug it. For each error you find, correct it, and describe each error in a comment. Hint: Some lines may not have errors, and some lines may have more than one error. (12 pts) X=[6 3 2 2.1 4.5]; %define X==[6 3 2 2.1 4.5] Y=3; % define Y=3 Z=X^Y; % define Z to be the product of X and Y X=sin(X)*X; % let each element of sin(X) times the corresponding element in X, then assign it to Z 7=7+1:0.5:Y; % assign a new value, vector 7 plus a vector, 1:0.5:Y, to variable 7. disp(X, Z); % display the final value of X and Z

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!