Question
In Matlab

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

MATLAB Script

clc;
clear;

A = [zeros(2,3), ones(2,2), zeros(2,2);eye(3), zeros(3,2), ones(3,2);zeros(2,3), eye(2), ones(2,2)];

disp('The matrix is: ');
disp(A)

After executing, we get

The matrix is:
0 0 0 1 1 0 0
0 0 0 1 1 0 0
1 0 0 0 0 1 1
0 1 0 0 0 1 1
0 0 1 0 0 1 1
0 0 0 1 0 1 1
0 0 0 0 1 1 1

>>

The screenshot

MATLAB R2019a - academic use х HOME PLOTS APPS EDITOR PUBLISH VIEW ? o Search Documentation $ Sign In New Open Save FILE Work

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