Question

%HW# 8 Ex clearicle 4 A-nones (3, 3) B = (n+1 ) *ones (3,3) ; C-ones (3,3) while ( A(1,1)+A (1,2)+A (1,3) <- 80,1)+83,21 ,3)

the programed used is Matlab but i want the answer by hand without Matlab
0 0
Add a comment Improve this question Transcribed image text
Answer #1

The program runs infinite times, initially matrix A is a 3*3 matrix with all 0s. B is 3 * 3 matrix with all ones and so is C.

The loop condition evaluates to 0 + 0 +0 <= 1+1+1 that is, 0<=3 which is true for the first time, again in the whole iteration of finding values C no updation is made to values in matrix A and B, the loop runs infinite times.

If the outer while loop is eliminated, the for loop runs for 1 to 3 .

Working is shown below, as it recalculates value for C(rr,cc) and C(cc,rr) few values remain 2 which are C(2,1), C(3,1) and C(3,2)

Next, C(12) e CC,3) have sama vo e-cha X3

Updated cC modix, A a9

Add a comment
Know the answer?
Add Answer to:
The programed used is Matlab but i want the answer by hand without 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