How to code these two signals
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Muhammad Atif
am 6 Apr. 2020
Kommentiert: Ameer Hamza
am 17 Apr. 2020
I have two signal need to write a program in picture, in which v(t) is uniformaly distributed within[0,0.1] over the interval [0,20].where a=0.2 and l=5. Can anybody help me to write a code for this???
Akzeptierte Antwort
Ameer Hamza
am 6 Apr. 2020
Try this
rng(0);
t = linspace(0,20,1000);
a = 0.2;
l = 5;
v = 0.1*rand(size(t));
w = zeros(size(t));
mask = 5 < t & t < 5+l./v;
w(mask) = a*pi*v(mask)/l.*sin(2*pi*v(mask)/l.*t(mask));
plot(t,w)
4 Kommentare
Ameer Hamza
am 17 Apr. 2020
try this
t1 = linspace(0,30,1000);
r = 0.1*rand(size(t1));
r = r.*(t1<20);
plot(t1,r)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!