Question: Question 2 (10 points) Saved Review the MATLAB script below. Each Line of the script either contains a syntax error, logic error, or no error.

 Question 2 (10 points) Saved Review the MATLAB script below. Each

Question 2 (10 points) Saved Review the MATLAB script below. Each Line of the script either contains a syntax error, logic error, or no error. Match each line with the specific coding error on that line (or no error). There can be multiple lines with the same error or no error. % Calculate x distance of a projectile from user inputs of alpha & vel Line 11 clear; clc; Line 2 alpha = input ("Enter initial trajectory angle in degrees: ','S'); $ degrees Line 3 vel = input ("Enter the initial velocity of the projectile [m/s]: '); % m/s Line 4 t = 0:1:15 % seconds Line 5 x = vel*cos (alpha) *t; % meters Line 6 tab = [t, x); Line 7| fprintf('Horizontal Distance of Projectile '); Line 8| fprintf('Time [sec]\t\tDistance [m] '); Line 9 fprintf("%2i\t\t5.2f ', tab); 1. No error 2. Incorrect conversion character Line 7 3. Variable undefined Line 5 4. Marker missing Line 3 5. Incorrect function for the input provided Line 4 6. Missing ; 1 Line 1 7. Use : versus Line 9 8. Missing 's' Line 6 9. Remove 's' 10. Use ; versus , Line 8 11. Incorrect use of [] 5 Line 2 12. Use : versus; 13. Do not include data

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!