Problem with mpfit.pro [message #89396] |
Mon, 06 October 2014 16:26  |
Payam Bagheri
Messages: 2 Registered: October 2014
|
Junior Member |
|
|
Hi there,
Has anyone worked with the fitting procedure mpfit.pro in IDL? When my fitting function exceeds around 3600 characters (I have to use really large fitting functions) the code gives me this error:
% MPFITEXPR: ERROR: execution of "The FUNCTION" failed
% MPFITEXPR: check syntax and parameter usage
Has any seen this and knows a work-around?
Thanks,
Payam
|
|
|
|
Re: Problem with mpfit.pro [message #89400 is a reply to message #89396] |
Tue, 07 October 2014 08:27  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
On Monday, October 6, 2014 7:26:26 PM UTC-4, Payam Bagheri wrote:
>
> Has anyone worked with the fitting procedure mpfit.pro in IDL? When my fitting function exceeds around 3600 characters (I have to use really large fitting functions) the code gives me this error:
>
> % MPFITEXPR: ERROR: execution of "The FUNCTION" failed
> % MPFITEXPR: check syntax and parameter usage
>
> Has any seen this and knows a work-around?
It means your string is not a valid IDL expression. The expression must be able to be EXECUTE()ed by IDL. I guess it is possible that IDL has a limit on the string size, but I don't know.
If you have a complicated function, you should be using MPFITFUN. Write your expression into a function once, and use that instead.
Craig
|
|
|