Hi, I am trying to plot a graph, but my graph keeps coming up empty without any plots.
My code is below and I would appreciate it greatly if anyone could spot where I've gone wrong.
Thanks
hold on;for i = 0:5th = 0:pi/50:2*pi;xv = i * cos(th); % for given value R
yv = i * sin(th); % R is the radius of the circle
rng defaultxq = -1000:1000;yq = -1000:1000;[X,Y] = meshgrid(yq,xq);[in,on] = inpolygon(X,Y,xv,yv);Y = numel(X(in), Y(in))E = abs(Y-pi*i^2)plot(i, E)grid onendhold off
Best Answer