Help projecting a vector onto another!

335 visualizaciones (últimos 30 días)
Viet
Viet el 24 de Mayo de 2016
Respondida: Roger Stafford el 25 de Mayo de 2016
Write a Matlab function projectUV(), that is, function [w] = projectUV(u,v) which computes a projection vector of u on v thus performing the operation projv = u v u v v Test the function by computing the projection of vector u = (1, 2, 3) onto v = (1, 1, 0).

Respuestas (2)

Roger Stafford
Roger Stafford el 25 de Mayo de 2016
dot(u,v)/dot(v,v)*v;

Todd Leonhardt
Todd Leonhardt el 25 de Mayo de 2016

Categorías

Más información sobre Startup and Shutdown 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