I need to create a function that projects vector b onto vector a
Mostrar comentarios más antiguos
I need to create a function that projects vector b onto vector a. I know that all elements of b is 1, and that it has the same dimensions as a. My function needs to work for all dimensions. How do i do this??? Especially the part of defining b
So far i have written this
function projection = computeProjection(a)
projection = (dot(a,b)/norm(a))*a;
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Resizing and Reshaping Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!