Symbolic entry of rem function
2 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
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 个评论
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/184213/image.jpeg)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear Algebra 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!