Page 1 of 1

error: eprload with matlab 2021b

Posted: Tue Jan 11, 2022 5:51 am
by JanaK

Hi,

while trying to use eprload for an xml-file in 2021b following bug showed itself:

eprload
Error using matlab.internal.math.interp1
Interpolation requires at least two sample points for each grid dimension.
Error in interp1 (line 188)
VqLite = matlab.internal.math.interp1(X,V,method,method,Xqcol);
Error in eprload_MagnettechXML
Error in eprload

We tried easyspin 5.2.33 as well as 6.xxx in 2021b, but none of them worked.
The script works in 2018b, 2019b and 2020b though. (5.2.33, 6.xxx)

We think the problem lies in Matlab 2021b in the script of interp1 around line 188 "VqLite".

Thanks for your help,
kind regards from Halle, Germany!


Re: error: eprload with matlab 2021b

Posted: Wed Jan 19, 2022 7:51 am
by Silvio

Hi,
I experience the same problem with 2021b. However, after investigating the eprload function, I think the problem lies in the base64 decoding of the data and not in interp1.

The base64 decoding of the curves and subsequent typecasting to double returns just a scalar (line 96-98 in eprload_MagnettechXML.m), therefore interp1 (doing an interpolation) throws the error that at least two sample points are needed for each dimension.

Unfortunately, I am no expert in base64 decoding and the underlying Java functions, so I am afraid I don't know how to fix the bug.

Best,
Silvio


Re: error: eprload with matlab 2021b

Posted: Wed Jan 19, 2022 9:32 am
by Stefan Stoll

This is a bug we should fix. Please open an issue on GitHub and post the xml file that triggers this error. Or just post the xml file here.


Re: error: eprload with matlab 2021b

Posted: Thu Jan 20, 2022 2:43 am
by JanaK

The forum didn't let me upload the files, so here's the link:

https://cloud.uni-halle.de/s/lQogYb4RPv9kaT1

Password: heisenberg

The link will be active till the end of next week.

Thanks!


Re: error: eprload with matlab 2021b

Posted: Fri Jan 21, 2022 1:03 am
by Stefan Stoll

Thanks. This is an incompatibility that R2021b introduced. The cause is clear, but it's unclear how to fix this without making the loading really slow. See the issue on GitHub.


Re: error: eprload with matlab 2021b

Posted: Tue Feb 01, 2022 9:40 am
by Stefan Stoll

This is fixed now in version 6.0.0-dev.36. Thanks for reporting!


Re: error: eprload with matlab 2021b

Posted: Wed Oct 12, 2022 7:33 am
by tastich

Thanks for fixing! Just stumbled across this bug myself.