how to multiple this matrix

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 Comment

Jan
Jan on 19 Feb 2012
It is helpful if you read and post the error message.

Sign in to comment.

Answers (1)

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 Comments

cool that's brilliant . cheers for thats
You might consider "accepting" this answer, which could help others who are seeking similar solutions.

Sign in to comment.

Asked:

on 19 Feb 2012

Edited:

on 16 Oct 2013

Community Treasure Hunt

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

Start Hunting!