Hello, I'm using a peak picking command "mspeaks" and after it process my data, it outputs it into a cell array with the following format (92x1 cell). Each row corresponding to a different sample.
76x2 double
74x2 double
72x2 double
30x2 double
43x2 double
32x2 double
26x2 double
65x2 double
etc...
In each individual cell, the first column is the x-axis point (m/z) and the second column is the corresponding y-value (intensity). I tried using the following loop, but the different number of rows/peaks detected causes an error.
for i=1:size(PP_ERMNBP,1)
PP_extract_mz(:,i)=PP_ERMNBP{i,1}(:,1)
PP_extract_Y(:,i)=PP_ERMNBP{i,1}(:,2)
end
Using "cell2mat" directly converts all the data into a single two column matrix which isn't useful, and transposing the cell array before hand also causes the same error.
I would like to extract all the x-axis points into one array/matrix, and all the y-axis points into another becauses I want to do some other operations and eventually save the data to a single .csv table (which I already have the script for).
Thanks for your help!