GSTools
A set of matlab functions to read, write and deal with .spc spectra and spectral descriptions
Author: Kris De Gussem
I tried this:
x = 1:0.1:100;
y = sin(x);
file = [x ; y]';
xlswrite('file.xls', file);
fread = xlsread('file.xls');
fX = fread(:,1); fY = fread(:,2);
GSSpcWrite ('newFile.spc', y, x) -> Works!
GSSpcWrite ('newFile.spc', fY, fX)
??? Error using ==> GSSpcWrite>CreateSPCFileFromMatrices at 217
Length of axis and number of spectral channels do not correspond.
Error in ==> GSSpcWrite at 189
CreateSPCFileFromMatrices (f, spectra, axis, logtxt, logbin, options);
How can I overcome this?
17 Jul 2012
GSTools
A set of matlab functions to read, write and deal with .spc spectra and spectral descriptions
Author: Kris De Gussem
Hi, very useful tool for spectroscopists.
However I could not use it properly, I think.
When I generate x and y axis randomly, I can write to SPC well. But When I try to read from XLS and write to SPC, I get the error "Length of axis and number of spectral channels do not correspond." eventhough the size of my data are the same.