Create a specific matrix (MATLAB)
1 view (last 30 days)
Show older comments
Commented: Star Strider on 6 Mar 2022
I want create a square matrix in such a way that I got the general form:
For example if we have m=4, we got:
How can I program that please!
Try this —
M = hankel(1:4,4:-1:1)
More Answers (1)
DGM on 6 Mar 2022
This is one way:
A = flipud(toeplitz([4 3 2 1]))
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!