how to write mathematical equation in matlab script (given in description)?

조회 수: 3 (최근 30일)
Yogesh Kumar
Yogesh Kumar 2022년 3월 9일
댓글: Walter Roberson 2022년 3월 10일
programming in matlab
  댓글 수: 4
Torsten
Torsten 2022년 3월 10일
편집: Torsten 2022년 3월 10일
In your workspace, h is listed as a function handle. You can call this function handle as h(i,j) and it will return a double evaluated at theta=i and z=j, but you cannot set this value to another double value, namely ((1+E*cos(theta(i)))...
What you could do in the loop is to write
H(i,j) = h(theta(i),z(i));
instead of
h(i,j) = ((1+E*cos(theta(i)))...
and continue working with the array H consisting of doubles.
Walter Roberson
Walter Roberson 2022년 3월 10일
Note that MATLAB uses period for decimal. X=0.0 not X=0,0

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by