not getting legend in the plot and not getting y axis name

1 visualización (últimos 30 días)
Sourav singh
Sourav singh el 5 de Abr. de 2021
Comentada: Walter Roberson el 6 de Abr. de 2021
sigma=0.047193;
V_tip=180;
W=180;
Cd_avg=0.01;
R=2.235;
%R1=2.68;
Rv=80.529; %rotational velocity
A=pi*R.^2;
rho=1.225;
Ct=0.0:0.0001:0.12;
for i = 1:numel(Ct)
Vs = -(sqrt(Ct./2)+((sigma*Cd_avg)./(8*Ct))).*(Rv*R); %descent speed
Cd_eq =((2*W)./(rho.*A.*(Vs).^2)); % equivalent drag coefficient of the rotor in steady descent
V_autorotationaldescent = -(sqrt(Ct./2)+((sigma*Cd_avg)./(8*Ct))); % steady autorotational descent rate
Vs1= -(sqrt(Ct./2)+((sigma*Cd_avg)./(8*Ct))).*(Rv*0.625*R);
end
figure(1)
hold on
plot(Ct,-Vs,'r-',Ct,-Vs1,'g');
xlabel("C_t");
ylabel("V_s");
title("Descent Rate vs. Thrust Coefficient");
legend({'Normal Diameter','Diameter x 1.25'},'FontSize',12,'Location','northeast','Orientation','horizontal')
figure(2)
plot(Ct,Cd_eq,'r-',Ct,-V_autorotationaldescent,'b')
xlabel('C_t')
ylabel('Cd_eq')
addaxislabel(2,'steady autorotational descent')
legend({'Cd_(eq)','V_s/\OmegaR'},'FontSize',14,'Location','northeast','Orientation','horizontal')
hold off
% sir i got the plot no.1 with legend and axis name and all.
% having problem in figure 2 not getting lengend and not getting 2 y axis
% name, help sir
  5 comentarios
Sourav singh
Sourav singh el 5 de Abr. de 2021
i so a tutorial on youtube regarding " how to add 2 y axis name in matlab" and in that video the person used that command
Walter Roberson
Walter Roberson el 6 de Abr. de 2021
Well, it is not part of MATLAB itself, so to use it in MATLAB you need to install addaxislabel from somewhere such as the File Exchange contribution I linked to.

Iniciar sesión para comentar.

Respuestas (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by