MATLAB: What is the problem with this code for pitch control of dfig

dfig

L=0.01:0.1:15; c1=0.5176; c2=116; c3=0.4; c4=5; c5=21; c6=0.0068; pitch=0:5:25; for i=1:6 for p=1:length(L); A(p)=1/(L(p)+0.08*pitch(i))-0.035/(pitch(i)^3+1); C(p)=c1*(c2*A(p)-c3*pitch(i)-c4)*exp(-c5*A(p))+c6*L(p); end plot(A(p),C(p)); hold on; end axis ([0 15 -0.1 0.5]); xlabel('\lambda'),ylabel('Cp');
I want the results attached below but i am getting empty screen also attached below. help me

Best Answer

clc; clear all ;
%given matrix
L=0.01:0.1:15;
c1=0.5176;
c2=116;
c3=0.4;
c4=5;
c5=21;
c6=0.0068;
pitch=0:5:25;
A = zeros(1,length(L)) ;
C = zeros(1,length(L)) ;
for i=1:6
for p=1:length(L);
A(p)=1/(L(p)+0.08*pitch(i))-0.035/(pitch(i)^3+1);
C(p)=c1*(c2*A(p)-c3*pitch(i)-c4)*exp(-c5*A(p))+c6*L(p);
end
plot(A,C);
hold on;
end
axis ([0 15 -0.1 0.5]);
xlabel('\lambda'),
ylabel('Cp');