Effacer les filtres
Effacer les filtres

i want two responce on same plot

2 vues (au cours des 30 derniers jours)
Muhammad
Muhammad le 10 Sep 2021
Modifié(e) : Awais Saeed le 10 Sep 2021
i want both step fuction on same plot with different colors
clc
clear all
s=tf('s')
t=(1*10^4)*s+(3*10^5)
y=s^5+98*s^4+2194*s^3+3655*s^2+107100*s+3*10^5
g= t/y
a=(1.2*10^4)*s+(2.7*10^5)
b=s^5+98*s^4+2194*s^3+3655*s^2+107100*s+2.7*10^5
c= a/b *exp(-10*s)
figure
subplot(1,2,1)
hold oon
% title('approximate responce')
step(g)
title('approximate responce')
grid on
subplot(1,2,2)
step(c)
title('approximate responce')
grid on
what command should be used

Réponse acceptée

Awais Saeed
Awais Saeed le 10 Sep 2021
Modifié(e) : Awais Saeed le 10 Sep 2021
Try
figure
hold on
step(g, 'r')
title('approximate responce')
step(c, 'g')
grid on
legend('step(g)', 'step(c)')
or just simply
step(g,'r',c,'g')

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by