Recursion Limit reachd
1 view (last 30 days)
Show older comments
I want to fit a data set with a cubic spline. I'm using the code that you can find at this link: http://www.mathworks.com/matlabcentral/fileexchange/13812-splinefit
I modified the first part with:
function pp = splinefit(varargin)
x = 'energy_keV';
y = 'total_w_coh';
pp = splinefit(x,y,4);
and I have this error message:
??? Maximum recursion limit of 1000 reached. Use set(0,'RecursionLimit',N) to change the limit. Be aware that exceeding your available stack space can crash MATLAB and/or your computer.
Error in ==> splinefit
I've changed the limit but it's always the same. What is better to do?
0 Comments
Accepted Answer
Jan
on 27 Jul 2011
Your function is called "splinefit" and it calls a function, which is called "splinefit". Most likely you want another name for your function, such that the function SPLINEFIT is not shadowed.
But it is very strange that you try to fit the strings 'energy_keV' and 'total_w_coh' ! I assume you want to use these strings as names of variables. But this far away from beeing valid Matlab syntax. Therefore I strongly recommend to read the Getting Started chapters in the documentation.
Maybe you want this:
pp = splinefit(energy_keV, total_w_coh, 4);
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!