Data Analysis Write a Porgram
1 回表示 (過去 30 日間)
古いコメントを表示
Mustafa Furkan SAHIN
2022 年 11 月 5 日
回答済み: Mustafa Furkan SAHIN
2022 年 12 月 11 日
How to write a program for finding the ortogonal projection of a given vector V1 on another given vector V2??
How should ı do? Which Matlab commands should i use?
5 件のコメント
Jan
2022 年 11 月 6 日
V1 .* V2 is the elementwise multiplication. You want the dot product instead: V1 * V2.' or dot(V1, V2). Mathematically this can be expressed as sum(V1 .* V2) also.
V1 .^ 2 squares each element, but you want the norm of the vectors: norm(V2)^2. This can be written as sum(V1 .* V1) also.
Try it. There are some different possible commands only, so you can solve this by "gunshot programming": modify the code until the result is as expected.
採用された回答
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!