Effacer les filtres
Effacer les filtres

how to write equation given below to find corresponding plot?

2 vues (au cours des 30 derniers jours)
ajeet verma
ajeet verma le 6 Juil 2017
Commenté : Star Strider le 7 Juil 2017
equation is given here
s(x)=(2a/T)*(x) when 0<=x<=T/2;
=2a*(1-x/T) when T/2<=x<=T;
here a=0.1 and T=20

Réponse acceptée

Star Strider
Star Strider le 6 Juil 2017
Try this:
a = 0.1;
T = 20;
s = @(x) (2*a*x/T) .* (0<=x & x<=T/2) + (2*a*(1-x/T)) .* (T/2<=x & x<=T);
x = linspace(0, 20);
sv = s(x);
figure(1)
plot(x,sv)
hold on
for k1 = 20:20:60
plot((x+k1),sv)
end
hold off
  6 commentaires
ajeet verma
ajeet verma le 7 Juil 2017
please see attached file
Star Strider
Star Strider le 7 Juil 2017
I believe I already addressed this in your other Question.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Time-Frequency Analysis 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