필터 지우기
필터 지우기

vector sum and magnitude

조회 수: 15 (최근 30일)
Robert
Robert 2012년 5월 16일
댓글: Aakash Deep 2018년 6월 1일
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에서 MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by