a problem in rectangular function.

1 回表示 (過去 30 日間)
mehdi Jafari
mehdi Jafari 2022 年 10 月 21 日
回答済み: Davide Masiello 2022 年 10 月 21 日
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]))

採用された回答

Davide Masiello
Davide Masiello 2022 年 10 月 21 日
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))

その他の回答 (0 件)

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by