Matlab - Matrix Projections

91 Views Asked by At

For homework, I would like to compute the projection of the first row of $ B $ ( $ B $ is an undefined large matrix) onto the third row of $ B $.

Here is what I have tried

text = 'dot(B(1,:),B(3,:))/ norm(B(1,:)^2)*B(1,:);'

I am unsure why this does not work...... can anyone offer a hint or two

Thanks

1

There are 1 best solutions below

0
On BEST ANSWER

Don’t square the norm of B(1,:), it should be divided by the product of the norms, not one squared times the other.