Filter löschen
Filter löschen

a problem in rectangular function.

1 Ansicht (letzte 30 Tage)
mehdi Jafari
mehdi Jafari am 21 Okt. 2022
Beantwortet: Davide Masiello am 21 Okt. 2022
I have a problem in ploting rectangular function. when i plot using fplot commnd, everything is ok, but when i try to plot it using plot function and just substitution of range by myself, i got another diagram.
and i want to evaluate convolution of two ractangular functions. how can i do that?sth like this:
conv(subs(f,a,1),subs(f,a,2))
please help, thanks.
a=1;
syms t
f=piecewise(a / 0.2e1 < abs(t), 0, abs(t) == a / 0.2e1, 0.1e1 / 0.2e1, abs(t) < a / 0.2e1, 1);
fplot(f)
plot(subs(f,t,[-4:4]))

Akzeptierte Antwort

Davide Masiello
Davide Masiello am 21 Okt. 2022
You are using plot incorrectly, see below.
a=1;
syms t
f=piecewise(a / 0.2e1 < abs(t), 0, abs(t) == a / 0.2e1, 0.1e1 / 0.2e1, abs(t) < a / 0.2e1, 1);
fplot(f)
plot(-5:0.001:5,subs(f,-5:0.001:5))

Weitere Antworten (0)

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by