Using MuPAD series inside MATLAB

조회 수: 10 (최근 30일)
Ludwig
Ludwig 2015년 2월 4일
댓글: Ludwig 2015년 2월 4일
Dear all,
I want to use series() in MATLAB. http://de.mathworks.com/help/symbolic/mupad_ref/series.html In MuPAD it works:
s := series(sin(x), x)
gives me:
x - x^3/6 + x^5/120 + O(x^7)
In MATLAB I use:
syms x
s = feval(symengine,'series',sin(x), x)
but this gives me:
Series::Puiseux::create(1, 1, 7, [1, 0, -1/6, 0, 1/120], x, 0, Undirected)
What can I do to get:
x - x^3/6 + x^5/120 + O(x^7)
instead?
Thanks and best regards
  댓글 수: 1
Ludwig
Ludwig 2015년 2월 4일
Btw.:
z = feval(symengine,'mtaylor',sin(x), x)
Works fine but I dont want to use the Taylor series.

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

채택된 답변

Sean de Wolski
Sean de Wolski 2015년 2월 4일
편집: Sean de Wolski 2015년 2월 4일
f = matlabFunction(s)
I'm kind of surprised that formula(s) doesn't return what you have above. It might be worth contacting tech support on that. The information is clearly there as matlabFunction or pretty show.
pretty(s)
  댓글 수: 1
Ludwig
Ludwig 2015년 2월 4일
Thank you for your answer. The command matlabFunction(s) does already help me but I also contacted the support as you indicated.

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

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by