MATLAB: How to write equation

dot slash vs. slashequation

r (y ) =(1-x^2)/(1-x*cos(y) where y= 0 to 2pi and x=(0,0.1,0.5,0.9)

Best Answer

x=[0,0.1,0.5,0.9]
y=linspace(0,2*pi,numel(x))
r=(1-x.^2)./(1-x.*cos(y))
plot(y,r,'-*b')