Question

9. (12 points) Using the MATLAB built-in functions (zeros, ones, eyes), write a MATLAB program to create the following matrix
0 0
Add a comment Improve this question Transcribed image text
Answer #1

The answer to the above problem is as follows:

  • Form all the sub matrix
  • Concat all the sub matrix into one final matrix
  • and display the final matrix

MATLAB CODE-

%%%%
clc;
%create all the sub matrix
m1 = zeros(2,3);
m2 = ones(2);
m3 = zeros(2);
m4 = eye(5);
m5 = ones(5,2);
%concat all submatrix to form the large matrix
M = [m1 m2 m3;
m4 m5];
disp(M);


IMAGE OF CODE-

1 2 - نيا 4. 5 - 6- 7 - clc; Screate all the sub matrix ml = zeros (2,3); m2 = ones (2); m3 = zeros (2); m4 eye (5); m5 = one

OUTPUT-

Command Window 0 0 0 0 1 0 1 1 0 0 1 0 0 0 1 0 0 0 1 1 1 0 0 1 0 1 0 0 1 1 0 0 0 0 1 1 1 1 0 0 1 0 1 0 0 0 1 1

If this answer helps, please give an up vote and feel free to comment for any query.

Add a comment
Know the answer?
Add Answer to:
9. (12 points) Using the MATLAB built-in functions (zeros, ones, eyes), write a MATLAB program to...
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