vector sum and magnitude

15 次查看(过去 30 天)
Robert
Robert 2012-5-16
I need to create a function that will take two 3D geometric vectors as its arguments, sums them, and returns the resultant vector and its magnitude
  2 个评论
Geoff
Geoff 2012-5-16
And your question is ..... ?
Aakash Deep
Aakash Deep 2018-6-1
Your statement is contradicting. If the values are in 1 dimension then it is a vector, if the values are in 2 dimensions then it is a matrix and if the values are in 3 or more dimensions then it is a tensor. So, 3D vector does not make any sense.

请先登录,再进行评论。

回答(1 个)

Geoff
Geoff 2012-5-16
Maybe this will help:
function [vec, mag] = DoMyHomeworkForMe( v1, v2 )
% Your calculation goes here
end
  10 个评论
Geoff
Geoff 2012-5-16
You're kidding... copy that exact code I wrote declaring two vectors (x and y) and paste it into MatLab.
Robert
Robert 2012-5-16
i was copying it wrong! sorrrrryyy

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Just for fun 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by