Hi, I have to find the even and the odd part of this function, and plot them.
I do this
syms t
y = piecewise(1 < t < 3, t-1, 0);
fplot(y)
and then?

 Akzeptierte Antwort

Matt J
Matt J am 14 Nov. 2022

1 Stimme

syms t
y = symfun( piecewise(1 < t < 3, t-1, 0) ,t);
yeven=(y(t)+y(-t))/2
yeven = 
fplot(yeven)
and similarly for the odd part.

3 Kommentare

FEDERICO RODELLA
FEDERICO RODELLA am 14 Nov. 2022
Bearbeitet: FEDERICO RODELLA am 14 Nov. 2022
Ok thank you so much :)
Matt J
Matt J am 14 Nov. 2022
Bearbeitet: Matt J am 14 Nov. 2022
You are quite welcome, but please Accept-click the answer if your question is resolved.
FEDERICO RODELLA
FEDERICO RODELLA am 14 Nov. 2022
Ok sorry 😅

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by