SLOW FSOLVE AND FZERO

조회 수: 5 (최근 30일)
Sukru
Sukru 2016년 10월 25일
편집: Sukru 2016년 10월 25일
Hi Dear All,
In my matlab code, for 2000 parameters, I need to calculate output. It took 25 secs. When I use profile viewer, it was suggested that 80 % of running time consumed in one line fsolve parameter.
Lets assume x^3-x^2+x-1=0 and I need to solve this but fsolve is quite slow when there is a large data set?
Any suggestion to avoid this problem? Should I write new solver?

채택된 답변

Torsten
Torsten 2016년 10월 25일
I don't know whether it's faster, but use "roots" instead of "fsolve" for zeros of polynomials.
Best wishes
Torsten.
  댓글 수: 2
Sukru
Sukru 2016년 10월 25일
I expect it to be much more slower because if I will solve it for every grid at each time step. I will try your suggestion, thank you
Sukru
Sukru 2016년 10월 25일
편집: Sukru 2016년 10월 25일
Thank you after this , it decreased to 5 seconds from 25 seconds.

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by