y=cos(\theta);
plot(y);
axis([-pi pi -1 1]);
I'm new to Matlab and am trying to display theta, this way doesn't work. How would I display theta in a trig function? I just created a simple version but I will need to apply it to a more complicated version once I understand how to apply it.
The
plotfunction accepts two parameters. You can useplot(theta,y)to have the angle on the $x-$axis and the function value on the $y-$axis.