I have a matrix A = [1 1 0 0 1 1]
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (2)
Stephen23
el 9 de Feb. de 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 comentarios
Ver también
Categorías
Más información sobre Model Predictive Control Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!