%Program of a wind turbine to determine the variation of power
%with the wind speed variation
%Cp values
beta =0; %pitch angle
ind2 =1; for lambda=0.1:0.01:11.8 lambdai(ind2)=(1./((1./(lambda-0.02.*beta)+(0.003./(beta^3+1))))); Cp(ind2)=0.73.*(151./lambdai(ind2)-0.58.*beta-0.002.*beta^2.14-13.2).*(exp(-18.4./lambdai(ind2))); ind2=ind2+1; end% Set values of density, rotor radius and velocity variation.
density = 1.2041;R = 63;v = [0.1:0.01:12];u = v.^2;%power as a function of wind speed
power = (0.5 .* pi .* density .* R^2 .* u .* Cp(ind2));%Plot the graph of power against wind sped
subplot(1,2,1)plot(u,power,'linewidth',1.5)gridxlabel('Wind speed (m/s)','fonstsize',14)ylable('Power(W)','fontsize',14)
MATLAB: I am trying to run the program below and i am getting the error “Index exceeds matrix dimensions” for the line power = (0.5 .* pi .* density .* R^2 .* u .* Cp(ind2)); Can some one please please help me.
index exceeds matrix dimensionswind turbine power
Best Answer