How can I shade the area between a curve and a vertical line?
Mostra commenti meno recenti
I am going to shade the area between the right side of vertical line and the curve as bellow. Could someone help me? I have attached the code as well.
m=60;L=1;J=60;g=9.81;Time_Delay=0.2;beta2=411.67;
%%
syms w
% W=[0.0001:0.1:18*pi];
W=[0.00001:0.1:3*pi];
% time=[0:0.1:1];
%%
omega=w;
tau=Time_Delay;
Kp1=(J*omega^2 + L*g*m)*cos(omega*tau)/(J*beta2);
Kd1=(J*omega^2 + L*g*m)*sin(omega*tau)/(J*beta2*omega);
%%
figure('DefaultAxesFontSize',10,'DefaultAxesFontName','Times')
D_Curve_PD_KP1=eval(subs(Kp1,w,W));
D_Curve_PD_KD1=eval(subs(Kd1,w,W));
%%
plot(D_Curve_PD_KP1,D_Curve_PD_KD1,'color',[1 0 0.75],'LineWidth', 2)
xlabel ('Kp','FontSize',11, 'FontName', 'Times')
ylabel ('Kd','FontSize',11, 'FontName', 'Times')
axis([0,0.05,0,0.025]);
title('TT', 'FontName', 'Times','FontSize',11)
grid on
hold on
%% Line
plot([0.02385 0.02383],[0 0.025],'color',[0 0 0.75],'LineWidth', 2)
1 Commento
N/A
il 18 Lug 2021
Risposta accettata
Più risposte (1)
Alan Stevens
il 18 Lug 2021
Modificato: Alan Stevens
il 18 Lug 2021
Try
help fill
or
help patch
Although they refer to polygons, you could easily represent your curve as a multi-segment polygon.
Categorie
Scopri di più su Annotations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
