Matrix multiplication using MATLAB -


if have following matrix:

a=[10   1   0   1   1    50   1   0   0   0    60   0   0   0   1] 

how can multiply first column in matrix [10 50 60]' vector multiplication rest of matrix , following:

b=[10  10  0  10  10    50  50  0   0   0    60  0   0   0   60] 

if want frame matrix multiplication, like:

b = [a(:,1), diag(a(:,1))*a(:,2:end)] 

should work (it's been while since i've done matlab, though).


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -