Plotting with a step

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

Risposte (1)

Star Strider
Star Strider il 3 Set 2020

0 voti

See the documentation for colon,:.

2 Commenti

Triston Pryor
Triston Pryor il 7 Set 2020
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.

Questa domanda è chiusa.

Richiesto:

il 2 Set 2020

Chiuso:

il 20 Ago 2021

Community Treasure Hunt

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

Start Hunting!

Translated by