How do i plot this in matlab

조회 수: 1 (최근 30일)
Ian Wilson
Ian Wilson 2019년 9월 9일
댓글: madhan ravi 2019년 9월 9일
x = [0:pi/2:2*pi]
y = -(sin(pi/2*cos(x))(-pi/2*sin(x))/cos(x)
Keep getting the "Error: ()-indexing must appear last in an index expression." I understand what the error means, but I've tried replacing some of the () with {}, and I'm still getting the same error. I guess I am unsure which () need to be replaced to {}.

채택된 답변

madhan ravi
madhan ravi 2019년 9월 9일
y = -(sin(pi/2*cos(x))Operator missing here(-pi/2*sin(x))./cos(x)
  댓글 수: 1
madhan ravi
madhan ravi 2019년 9월 9일
Also there’s an extra parenthesis at the beginning of the equation. See https://in.mathworks.com/help/matlab/matlab_prog/array-vs-matrix-operations.html

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by