Azzera filtri
Azzera filtri

For loop assignment error

1 visualizzazione (ultimi 30 giorni)
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

Risposte (0)

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by