Azzera filtri
Azzera filtri

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

3 visualizzazioni (ultimi 30 giorni)
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 Commenti
Sourav singh
Sourav singh il 5 Apr 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 il 6 Apr 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.

Accedi per commentare.

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by