how to multiple this matrix

1 visualización (últimos 30 días)
Nasir Qazi
Nasir Qazi el 19 de Feb. de 2012
Editada: Cedric el 16 de Oct. de 2013
C = [0.20 0.10 0.10 0.20 0.20 0.20];
Pv = [190 72.2 51.6 20.44 15.57 4.956];
P = 50;
K = Pv/P;
% calculate nv
A = C*(K-1);
% I cannot get the value of A .
  1 comentario
Jan
Jan el 19 de Feb. de 2012
It is helpful if you read and post the error message.

Iniciar sesión para comentar.

Respuestas (1)

the cyclist
the cyclist el 19 de Feb. de 2012
Use the syntax
A = C.*(K-1);
Notice that I used .* rather than just *. That syntax is for element-by-element multiplication, rather than matrix multiplication.
  2 comentarios
Nasir Qazi
Nasir Qazi el 19 de Feb. de 2012
cool that's brilliant . cheers for thats
the cyclist
the cyclist el 19 de Feb. de 2012
You might consider "accepting" this answer, which could help others who are seeking similar solutions.

Iniciar sesión para comentar.

Categorías

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