how i can write this in matlab

조회 수: 2 (최근 30일)
Serafim Galinschii
Serafim Galinschii 2020년 12월 16일
댓글: Jan 2020년 12월 17일
  댓글 수: 1
Jan
Jan 2020년 12월 17일
Do you want some code to evaluatre this expression? Then what is i and j?
Or do you want to write this as a lable or title of a diagram and ask for bold font, italics and the dot?

댓글을 달려면 로그인하십시오.

답변 (2개)

Matt Gaidica
Matt Gaidica 2020년 12월 17일
i - 1.3 * diff(y) * j
  댓글 수: 1
Walter Roberson
Walter Roberson 2020년 12월 17일
Probably not. and are usually used to represent unit vectors.

댓글을 달려면 로그인하십시오.


Walter Roberson
Walter Roberson 2020년 12월 17일
That is a bit ambiguous, but most likely the MATLAB for that would be
-1.3j * diff(y)
You might notice that this has no i in it. It is likely that you should not use
i - 1.3j * diff(y) %PROBABLY WRONG
In the image you show, i and j are most likely unit vectors along two axes (that are usually mapped to x and y) . MATLAB does not have distinct unit vectors in multiple dimensions, just real values and imaginary values . MATLAB uses both i and j to represent the same value, sqrt(-1), so (for example) 1*i - 1*j would be 1*sqrt(-1) - 1*sqrt(-1) which would be 0.
  댓글 수: 1
Adam Danz
Adam Danz 2020년 12월 17일
Also, watch out for predefined i and j variables which are common variable names in loops. That can be fixed by including
clear i j
if you're running this in a script.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by