Hello. How to create such a matrix?
2 views (last 30 days)
Show older comments
Azad Asadov
on 10 Dec 2018
Commented: Azad Asadov
on 10 Dec 2018
1 0 2 0 ..
0 2 0 3 ..
2 0 3 0 ..
0 3 0 4 ..
3 0 4 0 ..
: : : :
1 Comment
Stephen23
on 10 Dec 2018
@Azad Asadov: you tagged your question with "infinite matrix", which of course cannot be stored on any computer in the world.
Accepted Answer
Image Analyst
on 10 Dec 2018
Another way:
c = [1 0 2 0 3];
r = [3 0 4 0];
h = hankel(c,r)
You'll see
h =
1 0 2 0
0 2 0 3
2 0 3 0
0 3 0 4
3 0 4 0
More Answers (1)
Image Analyst
on 10 Dec 2018
Try this:
m = [...
1 0 2 0; ...
0 2 0 3; ...
2 0 3 0; ...
0 3 0 4; ...
3 0 4 0]
0 Comments
See Also
Categories
Find more on Resizing and Reshaping Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!