I'm trying to fit the VALUES to make a polar plot but it seems I couldn't fit one value 1400e2 which the polyfit doesn't take it? what other function should I use to make the polar plot correct so that it contains the values exactly at that degree ?
VGV = [ 2000e2 1800e2 1600e2 1400e2 ]; % [0 45 90 135 ]
angle = (pi/180).* [ 0 45 90 135 ];alpha = (0:0.1:360);alpha1 = (pi/180).*(0:0.1:360);for k=1:1:length(alpha) p = polyfit(angle,VGV,2); f = polyval(p,alpha1(1:1:901)); f1 = fliplr(f(1:1:900)); f2 = fliplr(f1); f3 = fliplr(f2); Vp = [ f f1 f2 f3]; endfigure;polar(alpha1(1:1:3601),Vp,'o')
Best Answer