Plotting with a step

plot cos(a), -90 < a < 90, with a step of 1 degree

답변 (1개)

Star Strider
Star Strider 2020년 9월 3일

0 개 추천

See the documentation for colon,:.

댓글 수: 2

Triston Pryor
Triston Pryor 2020년 9월 7일
This didnt help at all, but thank you anyway for the response.
The step works (the default step is 1, as the documentation states):
a = -90:90;
Note that the argument is in degrees, however the cos function accepts radian arguments. That is likely the problem. Since this appears to be homework, I leave that for you to solve.

이 질문은 마감되었습니다.

질문:

2020년 9월 2일

마감:

2021년 8월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by