Borrar filtros
Borrar filtros

How to save values of a double for loop ?

3 visualizaciones (últimos 30 días)
Fox
Fox el 4 de En. de 2016
Respondida: Vineeth Kartha el 6 de En. de 2016
I want to save the different values of bety2 of the following double for loop in a matrix, however my code doesn't work.
bee=zeros(16,41);
for i=1:41
for k=1:2:16
bety2=((z3(0+k:1+k,1+i:20+i)*z3(0+k:1+k,1+i:20+i)')^-1)*(z3(0+k:1+k,1+i:20+i)*...
y3(1+i:20+i));
bee(k:k+1,i:i+1)=bety2
end
end
bee should be a 16x41 matrix. Can somebody helps me with this problem ?
  1 comentario
Adam
Adam el 4 de En. de 2016
In what way does it 'not work'? Does it crash or give the wrong size output or something else?

Iniciar sesión para comentar.

Respuestas (1)

Vineeth Kartha
Vineeth Kartha el 6 de En. de 2016
Hi, Please provide the values of z3 and y3 and their dimensions, Also please provide the exact error message that you receive.

Categorías

Más información sobre Programming en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by