Question: a) Given three vectors, time = [1 1.5 2.0 2.5 3.0], vel = [60 80 100 120 140], Aclr = [30 44 56 75 90)

 a) Given three vectors, time = [1 1.5 2.0 2.5 3.0],vel = [60 80 100 120 140], Aclr = [30 44 56

a) Given three vectors, time = [1 1.5 2.0 2.5 3.0], vel = [60 80 100 120 140], Aclr = [30 44 56 75 90) Four different MATLAB commands involved vector time, vel and Aclr was executed in the command window below. However, the commands have errors. Identify the errors and write the correct commands in the given empty space to produce the correct answer given below the line (10 Marks) >> time = [1:0.5:3); >> vel=linspace (60:140:5) Not enough input arguments. Error in linspace (line 19) floor (double (n)); - vel = 60 80 100 120 140 >> time*vel Error using Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second matrix. To perform elementwise multiplication, use ans = 1100 >> Acir=[30 44 56 75 90]; >> Aclr*time Error using Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second matrix. To perform elementwise multiplication, use ans = 30.0000 66.0000 112.0000 187.5000 270.0000 >>table (time vel, 'VariableNames', 'Time', 'Velocity')) Error: Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses. ans = 5x2 table Time Velocity 1 60 1.5 80 2 100 2.5 120 3 140

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!