error: eprload with matlab 2021b

A place to report and discuss potential bugs
Post Reply
JanaK
Newbie
Posts: 3
Joined: Tue Jan 11, 2022 5:13 am

error: eprload with matlab 2021b

Post 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!

Silvio
User
Posts: 10
Joined: Mon Oct 16, 2017 8:37 am

Re: error: eprload with matlab 2021b

Post 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

Stefan Stoll
EasySpin Creator
Posts: 1108
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: error: eprload with matlab 2021b

Post 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.

JanaK
Newbie
Posts: 3
Joined: Tue Jan 11, 2022 5:13 am

Re: error: eprload with matlab 2021b

Post 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!

Stefan Stoll
EasySpin Creator
Posts: 1108
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: error: eprload with matlab 2021b

Post 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.

Stefan Stoll
EasySpin Creator
Posts: 1108
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: error: eprload with matlab 2021b

Post by Stefan Stoll »

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

tastich
Newbie
Posts: 5
Joined: Mon Jul 28, 2014 3:10 pm

Re: error: eprload with matlab 2021b

Post by tastich »

Thanks for fixing! Just stumbled across this bug myself.

Post Reply