how to convert a symbolic function into type double

hi there, i have a symbolic function in the form y= A *(B*t + exp(t)) + ph(t), where ph is also symbolic, and i want to compare it with experimental data in order to estimate the values of the parameters A and B. When i call the lsqcurvefit command i am told that the input y should be of data type double. how can i deal with this ??

댓글 수: 2

You have to define ‘ph’ as a function of t, and incorporate it into your ‘y’ function. The lsqcurvefit function requires that ‘y’ be a function file or an anonymous function, and in a specific format, not a symbolic function.
maria
maria 2015년 7월 15일
편집: maria 2015년 7월 15일
ph(t) is defined previsouvly in the code but even when i write y= A *(B*t + exp(t)), the problem still remains. lsqcurvefit doesn't accept symbolic functions, so how am i supposed to convert it into type double and estimate the parameters ??

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Systems of Nonlinear Equations에 대해 자세히 알아보기

질문:

2015년 7월 14일

편집:

2015년 7월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by