Borrar filtros
Borrar filtros

How to add a value to a already existing matrix?

3 visualizaciones (últimos 30 días)
Rachuan
Rachuan el 7 de Sept. de 2014
Comentada: Mahesh el 7 de Sept. de 2014
KB=[1 3;4 5] for i:Nbarras Mgl(i,1)= Mgl(i,1) + KB(i,1)
which method is correct? for i:Nbarras Mgl(i,1)= Mgl(i,1) + KB(i,1)
or for i:Nbarras Mgl(i,1)=+KB(i,1)
or somehow else?

Respuesta aceptada

Mahesh
Mahesh el 7 de Sept. de 2014
I hope the correct one, if you have already defined Mgl, is
Mgl(1,1)= Mgl(1,1) + KB(1,1)
Good luck
  2 comentarios
Rachuan
Rachuan el 7 de Sept. de 2014
When i do it like that it shows
"Undefined function 'Mgl' for input arguments of type 'double'."
Mahesh
Mahesh el 7 de Sept. de 2014
you need to define Mgl matrix if you do not have like
Mgl = zeros(2,2)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre NaNs 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!

Translated by