Page 1 of 1

Rescale function error

Posted: Mon Oct 04, 2021 10:43 am
by thanasis

I am running a fit using a custom function. Naturally, after the pepper invocation in the custom function I use a rescale command to rescale the calculated with the experimental y-values.

[x,y] = pepper(fullSys,Exp,Opt);
y_ref = Sys.spc;
y_rescale = rescale(y(:), y_ref(:), 'lsq0');

On a Linux machine running Matlab 2018a it works just fine. On a Windows machine running Matlab 2019a I get the error:

Error using esfit
Error using rescale>preprocessInputs (line 112)
Interval bound arguments must be real and numeric.

Error in esfit_simplex

Error in esfit

Error while evaluating UIControl Callback.

As there is also a Matlab rescale function (https://fr.mathworks.com/help/matlab/ref/rescale.html) I can't tell where the error comes from. I suppose the ES rescale function overrides the Matlab one?

Is there a way to debug this?

Thanks!


Re: Rescale function error

Posted: Mon Oct 04, 2021 6:17 pm
by Matt Krzyaniak

In the development version this has been fixed, the ES function rescale was renamed rescaledata which avoids, as in your case, the other Matlab rescale function.


Re: Rescale function error

Posted: Tue Oct 05, 2021 12:27 am
by thanasis

Yes that did the trick!

Thank you Matt.