Dimensions of return values from eprload and esfit

A place to report and discuss potential bugs
Post Reply
katarkon
Local Expert
Posts: 185
Joined: Mon Jan 12, 2015 4:01 am

Dimensions of return values from eprload and esfit

Post by katarkon »

The function eprload returns x and y values in different dimensions. The x values return as <1 x nPoints double> whereas y ones return as <nPoints x 1 double>. Moreover, esfit returns y values as <1 x nPoints double>, it makes certain inconvenience.
Matt Krzyaniak
EasySpin Guru
Posts: 153
Joined: Tue Jul 22, 2014 11:01 am
Location: Northwestern University

Re: Dimensions of return values from eprload and esfit

Post by Matt Krzyaniak »

That is a minor bug that will get fixed in the next update. In general EasySpin should output row vectors. One easy work around is to either force everything into a column or ensure everything is a row by using (:) such as:

Code: Select all

[x,y] = eprload;
% shift the data into column
x=x(:);
y=y(:);

% or force a row vector 
x=x(:).';
y=y(:).';

katarkon
Local Expert
Posts: 185
Joined: Mon Jan 12, 2015 4:01 am

Re: Dimensions of return values from eprload and esfit

Post by katarkon »

Thanks. I used reshape function to override this inconvenience.
Post Reply