vector sum and magnitude

16 Ansichten (letzte 30 Tage)
Robert
Robert am 16 Mai 2012
Kommentiert: Aakash Deep am 1 Jun. 2018
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 Kommentare
Geoff
Geoff am 16 Mai 2012
And your question is ..... ?
Aakash Deep
Aakash Deep am 1 Jun. 2018
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.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

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

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by