I have a matrix A = [1 1 0 0 1 1]
13 views (last 30 days)
Show older comments
I have a matrix A = [1 1 0 0 1 1]. I want to add 0 one by one on this matrix like this
A = [0 1 1 0 0 1 1]
A= [1 0 1 0 0 1 1]
A = [1 1 0 0 0 1 1]
up to so on all the places. How I will do that via coding?
0 Comments
Answers (2)
Stephen23
on 9 Feb 2020
>> A = [1,1,0,0,1,1];
>> B = toeplitz([0,A])
B =
0 1 1 0 0 1 1
1 0 1 1 0 0 1
1 1 0 1 1 0 0
0 1 1 0 1 1 0
0 0 1 1 0 1 1
1 0 0 1 1 0 1
1 1 0 0 1 1 0
0 Comments
See Also
Categories
Find more on Model Predictive Control Toolbox 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!