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

Part I Provide the answers to the following Matlab commands (if an error exists,

ID: 3750515 • Letter: P

Question

Part I Provide the answers to the following Matlab commands (if an error exists, state that as your answer). No calculators or electronic devices allowed in Part I. >> clear; >>B=[1; -1; 2; 5]; 1. (x pts) >> (norm(B)).^2 2. (x pts) >> 3.2:-1:0 3. (x pts) >>a=0. 5;b=-0.75/2;a*3^2 4. (x pts) >> abs(-2.1) 5. (x pts) >>exp(log(2)) 6. (x pts) >>abs(ceil(-4.1)) 7. (x pts) >>atan(1) 8. (x pts) >> factorial(4) 9. (x pts) >> sort([-3 2 -5 1]) 10. (x pts) >> size([1 2 3; 4 5 6 ]) 11. (x pts) >> [m, n] = min([ -5 4 -6 10 ]); >> m >> n 12. (x pts) >> floor(-4.1) 13.(x pts) >> ceil(-5.1) 14.(x pts) >> cos([ 0 pi/2 -1 ]) 15. (x pts) >> J = -0.1:0.5:1;J.^2

Explanation / Answer

B=[1; -1; 2; 5];
(norm(B)).^2 Output: 31.00
3.2:-1:0 Output: 3.20000 2.20000 1.20000 0.20000
a=0.5;b=-0.75/2;a*3^2 Output: -6.7500
abs(-2.1) Output: 2.1000
exp(log(2)) Output: 2
abs(ceil(-4.1)) Output: 4
atan(1) Output: 0.78540
factorial(4) Output: 24
sort([-3 2 -5 1]) Output: -5 -3 1 2
size([1 2 3; 4 5 6 ]) Output: 2 3
[m, n] = min([ -5 4 -6 10 ]);
m Output: -6
n Output: 3
floor(-4.1) Output: -5
ceil(-5.1) Output: -5
cos([ 0 pi/2 -1 ]) Output: 1.0000e+00 6.1232e-17 5.4030e-01
J = -0.1:0.5:1;J.^2 Output: 0.010000 0.160000 0.810000

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