Question

Files い2》 New Magma moving int ! Brick Oven-Google Ma 办Calculate summation us」 Home Chegg.com × x × × ← -> d 을 Secure https://utexas.instructure.com/courses/1 207025/files/folder/Homework/Hw4?preview-43392926 HW4.pdf Download ⓘInfo ×Close -ZOOM rodut Using Loops: Consider the following vector, , and matrices, A and B z=[0 1 1-5 2012 22]. Dashboa Calculate the following by hand and then write (by hand) the equivalent MATLAB loop: Cour Hints: i. 11 symbol is for a product and is analogous to the summation symbol: 1121-1x2x3x ×40 ii. Aij means row i and column j of matrix A iii You nay try your codes in Matlab if you want to verify your handwritten codes and your re Remember: You will NOT have access to Matlab in a quiz or i a Cxa 2. Picceuwise functions are sometimes useful when the relationship between a dependent and an independent variable canot be adequately represented by a single equation. For example, the teperature of a pot might be described by 102520, 0t<8 624-5t+20, 8<ts16 (t)3612(t 16)2 20, 16 <t 20 213e Q1(U 2520, 26 3:28 PM E 10/12/2017 8 Type here to search

I need help with writing the for loops required to calculate c and d in Matlab

0 0
Add a comment Improve this question Transcribed image text
Answer #1

%%if the answer doesnt match, please tell me about it in the comments
%%section
clear
clc
A=[3 2 -1;0 1 -2;-2 2 -2];
B=[-4 0 2;1 1 3;-3 1 0];
s1=0;
s2=0;
for i=2:3
s1=0;
for j=1:2
s1=s1+A(1,j)*B(j,i);
end
s2=s2+s1*A(2,i);
end
fprintf('Answer of part c:%i\n',s2)
p1=1;
p2=1;
for k=1:2
p1=1;
for m=1:2
p1=p1*A(m,k);
end
p2=p2*p1*(k+1);
end
fprintf('Answer of part d:%i\n',p2)

clear clc A-[3 2-1:0 1 -2:-2 2 -2]: B=[-4 0 2:1 1 3;-3 1 0]; sl-0; s2=0; for i=2 : 3 Command Window Answer of part c:-22 Answ

Add a comment
Know the answer?
Add Answer to:
I need help with writing the for loops required to calculate c and d in Matlab...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT