curve fitting - Find maximum of Gaussian with multiple terms - matlab -


i've got data set (x,y), fit gaussian 3 terms (gauss3):

[gaussianfit,gof]=fit(x,y,'gauss3'); 

now, want find maximum of function. know gauss1, maximum b1 parameter, have no clue on how find maximum, when sum of multiple gaussians. terms seems weighted (otherwise, idea average of 3 b-terms). second thought solve entire differentiated function parameters:

syms x diff(a1.*exp(-((x-b1)./c1).^2) + a2.*exp(-((x-b2)./c2).^2) + a3.*exp(-((x-b3)./c3).^2)==0); solve(deqn,x) 

... gives me weird values parameters, not original values. , feel cumbersome solution simple.

i hope can me, i'm out of ideas.

it easiest reconstruct distribution fitted parameters, don't need use symbolic maths it.

you can generate reconstructed curve using eval, find maximum value of normal:

a = 3; b = 4; x = 1:10; recon = eval('a*x + b'); [mx, mi] = max(recon); 

you can expression string returned fit object, or use canonical form.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -