Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

After the MATLAB commands below are entered into the command window, write down

ID: 3837123 • Letter: A

Question

After the MATLAB commands below are entered into the command window, write down value of "result": MATLAB commands: > > Z = [2 1 8; 5 0 11; 1 7 9]; > > result = Z(1, :)'; After the m-file below is run in MATLAB, what will the value of "avg" be? m-file: c = [2; 3; 4; 5]; sum = 0; for i =1: length(c) d(i) = c(i)^2; d(i) - d(i) + l; sum = sum+d(i); end avg = sum/length(c); if avg > 35 end; Will the code below run successfully? If so, write down the value of A after the code runs. If not, what needs to be changed in order to make it run successfully, and then what will A be after the code runs? m-file: A = [0 0 0 0; 1 1 1 1 1; 2 2 2 2]; x = [0 1.5 3] g = x^2; A(1, :) = [1 g];

Explanation / Answer

1. result = 2 1 8

2. avg = 14.500

3. FIrst it will show the following error.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote