However, I need something a little simpler:
When I fit multicomponent systems, ES exports only the composite spectrum. In order to deconvolute the components, I have only come up with some tricks of my own, none of which is satisfactory.
E.g.: make a run with the best-fit parameters (I let just one vary by very-very little so that I don't get an error) once with Sys1.weight = 0 and then with Sys2.weight = 0. Then I get the individual components. However, they are not weighed to one another, so a composite plot (component + component2 + composite spectrum) will be out of scale.
I have devised a little hack, where I make a custom function and I use an else statement as Matt previously suggested (viewtopic.php?f=3&t=328#p1016). Then, after my custom function makes the calculation, I instruct it to export it to an ascii file:
Code: Select all
[x,y] = pepper(Sys,Exp,Opt);
sys1=y' ; save('sys1','sys1','-ascii');
Have I overlooked something? Is this possible in a clean manner out of the box, or by using a custom function?