MATLAB: How to plot cos(x)^4/(1-0.5cos(x))^6 between 0 and 90 degrees

cos(x)plottrigonometry

Have attempted this but gives error regarding matrices, could someone tell me the error in my code? Did it in one line at y = , but gives y as single value so can't be plotted.
x = (0:1:90)
a = cos(x).^4
b = (1-0.5*cos(x)).^6
y = a/b
plot(x,y,'k+-')

Best Answer

You need to do elementwise operation. Try this:
x=0:0.01:pi/2;
y=cos(x).^4./(1-0.5*cos(x)).^6;
plot(180*x/pi,y)