Effacer les filtres
Effacer les filtres

For loop assignment error

1 vue (au cours des 30 derniers jours)
Hugo Hernández Hernández
Hi all,
I have crated a set of equations assigned to a letter and contains a variable that goes until 14002, to fill a matrix with this computations I am trying the following:
Axz = zeros(14002,4);
for i=1:14002
Axz(:,i) = [dxx,dxx_,dxz,dxz_;dzx,dzx_,dzz,dzz_];
end
The problem comes with the followinf Error:
Unable to perform assignment because the size of the left side is 14002-by-1 and the size of the right side is 14002-by-4.
Error in Test (line 51)
Axz(:,i) = [dxx,dxx_,dxz,dxz_;dzx,dzx_,dzz,dzz_];
How can I set the left side to be 14002 by 4?
Thanks for you help!
Hugo

Réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by