Even and odd part of function

조회 수: 9 (최근 30일)
FEDERICO RODELLA
FEDERICO RODELLA 2022년 11월 14일
댓글: FEDERICO RODELLA 2022년 11월 14일
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?

채택된 답변

Matt J
Matt J 2022년 11월 14일
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
Matt J
Matt J 2022년 11월 14일
편집: Matt J 2022년 11월 14일
You are quite welcome, but please Accept-click the answer if your question is resolved.
FEDERICO RODELLA
FEDERICO RODELLA 2022년 11월 14일
Ok sorry 😅

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by