Is it possible to Peakfit a matrix?
Show older comments
I have been trying to make a loop for this matrix (575x100) it is 100 replicates of a spectrum. I want to peakfit each of the replicates and get the peak area from each one. I cannot figure out how to get matlab to output the data into a nice fashion. It analyzes the spectra but the table ends up only having one row of data. It should be 100x5. I am not matlab savvy by no means but I feel like there is a way (I just don't know how). Below is what I have. I used 1-5 only for times sake.
for x = [1:5]
s1table(1:end,1:5) = peakfit([shift,s1_led1(:,x)],1586,60,1,6,0,100,0,1);
end
this is another one I made yesterday, but I realized it didn't analyze all of the data, it just repeated the 5th replicate's peak fit 5 times. I really hope this is possible as it would save me so much time. I am open to other ideas, but I only have used numerical matrices... Please help.
for r = s1_led2(:,(x))
for x = 1:5
s1table((x),:) = peakfit([shift,(r)],1586,60,1,6,0,100,0,1);
end
end
3 Comments
Walter Roberson
on 13 Dec 2023
Edited: Walter Roberson
on 13 Dec 2023
peakfit() is not a MATLAB function. Please indicate where you got it so we can check.
Also please indicate size(shift) and size(sl_led1)
Lindsey
on 13 Dec 2023
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!