필터 지우기
필터 지우기

Symbolic entry of rem function

조회 수: 2 (최근 30일)
Nate
Nate 2014년 9월 27일
댓글: DmArcher 2017년 4월 24일
When entering the following symbolic code using the remainder (rem) function, Matlab returns x(t,P) = 0, which is clearly wrong.
syms t P
x(t, P) = rem(t,P);
x
I have tried all combinations of sym, syms, symfun, but the result is the same. I need to enter the symbolic function x = rem(t,P) to perform symbolic integration on it over the period t = [0:P].
Help is appreciated, thanks

채택된 답변

Star Strider
Star Strider 2014년 9월 27일
Wrong function. Use mod instead for symbolic operations:
syms t P
x(t, P) = mod(t,P);
x
returns:
x(t, P) =
t*(1 mod P)
  댓글 수: 5
Star Strider
Star Strider 2014년 9월 28일
My pleasure!
It was a fun challenge for me!
DmArcher
DmArcher 2017년 4월 24일
When I type your code I get some errors. Is it possible that you can tell me where I did it wrong? Thx.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by