esfit error line 130 using custom function
Posted: Mon Jun 19, 2017 4:23 pm
I wrote a custom function that outputs a vector of residuals from experimental - simulated for a dozen or so spectra. I'm trying to use esfit to minimize this vector from my function, but keep getting an error.
Specifically:
Providing esfit('myfunction',thegoal,Sys,Vary,Exps,Opt) where 'thegoal' is a vector of zeros of equal length and dimensions as y.
Any help with what is causing the error at line 130 of esfit would be greatly appreciated. I can attach a test data set, script, and the function if helpful.
Specifically:
Output from function is [x,y] = myfunction(Sys,Exps,Opt)Error using ~=
Too many input arguments.
Error in /home/derek/Documents/MATLAB/easyspin/easyspin/esfit.p>esfit (line 130)
Providing esfit('myfunction',thegoal,Sys,Vary,Exps,Opt) where 'thegoal' is a vector of zeros of equal length and dimensions as y.
Any help with what is causing the error at line 130 of esfit would be greatly appreciated. I can attach a test data set, script, and the function if helpful.