gpufit / Gpufit

GPU-accelerated Levenberg-Marquardt curve fitting in CUDA
MIT License
312 stars 92 forks source link

Matlab gpufit_constrained wrong input check #83

Closed AlanMiranda closed 3 years ago

AlanMiranda commented 4 years ago

I noticed that the inputs check in the matlab function "gpufit_constrained" is incorrect. When user_info is supplied, it is ignored because the condition "if nargin < 12" should be "if nargin < 11" in order to not initialize the user_info with an empty array. The rest of the nargin checks need to be corrected as well by substracting one to the nargin value check. After these corrections the function works correctly.

jkfindeisen commented 3 years ago

You're right. I fixed it in the last commit.