Solve Difference Equations symbolically

4 次查看(过去 30 天)
Hello, how to solve difference equations symbolically?
in another application called Maxima, there is a function called solve_rec

采纳的回答

Amr Younis
Amr Younis 2017-2-13
编辑:Amr Younis 2017-2-13
i think i found the answer: the solver is a MuPad one:
syms y(n);
y(n)=evalin(symengine,'solve(rec(y(n)=y(n-1)+y(n-2),y(n),y(0)=0,y(1)=1}))');
double(y(7))

更多回答(1 个)

Karan Gill
Karan Gill 2017-2-13
编辑:Karan Gill 2017-10-17
Use dsolve: https://www.mathworks.com/help/symbolic/dsolve.html. There's no need to use MuPAD.
  1 个评论
Soham Chatterjee
Soham Chatterjee 2019-7-18
编辑:Soham Chatterjee 2019-7-18
The answer you have given will only work for differential equations, if I am not wrong. But I need the solution for a difference equation, can you please help me out.

请先登录,再进行评论。

产品

Community Treasure Hunt

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

Start Hunting!

Translated by