필터 지우기
필터 지우기

How big is the polynomial that sym2poly can hold?

조회 수: 4 (최근 30일)
sadel
sadel 2011년 6월 28일
How big is the polynomial that sym2poly can hold?
For example, I have this y=sym2poly(sym('x^1000'))
and it's ok. But if I increase the number to x^10000000000, Matlab crashes. How can I avoid this?

채택된 답변

Walter Roberson
Walter Roberson 2011년 6월 28일
Use 64 bit MATLAB on a system that has at least 80 gigabytes of memory.
Suppose that the sym2poly worked, then the vector returned would have to have 10000000001 elements, each a double precision number. That would be 80000000008 bytes, which is about 75 gigabytes.
The limitation you are encountering isn't sym2poly itself: the limitation is the amount of memory you have.

추가 답변 (1개)

Sean de Wolski
Sean de Wolski 2011년 6월 28일
2.8823e+17
  댓글 수: 6
Sean de Wolski
Sean de Wolski 2011년 6월 28일
Per usual, you win.
Walter Roberson
Walter Roberson 2011년 6월 28일
Did I say "up to 64 bytes" ? I meant "up to 2^64 bytes".
Maybe some day we'll get to edit comments...

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

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by