How to find parameters of the following coefficient based on optimization tool?
    7 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
Hi everyone, I have the following input and function, my purpose is to calculate the value of a,m and n which are scalars using curve fitting in matlab. I have:
ew=[0.679 0.613 0.613 0.501 0.497 0.50 0.389 0.386 0.386 0.391 0.390 0.288 0.288 0.288 0.289 0.289]; Hw=[0.757 0.669 0.71 0.577 0.57 0.60 0.50 0.55 0.52 0.50 0.476 0.353 0.388 0.379 0.431 0.371]; k=[0.217 0.217 0.217 0.163 0.163 0.163 0.131 0.131 0.131 0.131 0.131 0.109 0.109 0.109 0.109 0.109];
Hw=[ew*(1+0.36(1-ew))]*C; C=exp[-a*(k^m)*(1-ew)^n];
any help would be appreciated.
1 Commento
  Alan Weiss
    
      
 il 11 Apr 2016
				Please format your question using the {} Code button so that we might read it more easily.
Alan Weiss
MATLAB mathematical toolbox documentation
Risposte (2)
  Roger Stafford
      
      
 il 12 Apr 2016
        Define the following sum of squares of differences:
   ew=[0.679 0.613 0.613 0.501 0.497 0.50  0.389 0.386 0.386 0.391 0.390 0.288 0.288 0.288 0.289 0.289]; 
   Hw=[0.757 0.669 0.71  0.577 0.57  0.60  0.50  0.55  0.52  0.50  0.476 0.353 0.388 0.379 0.431 0.371]; 
   k= [0.217 0.217 0.217 0.163 0.163 0.163 0.131 0.131 0.131 0.131 0.131 0.109 0.109 0.109 0.109 0.109];
   function s = myfun(a,m,n)
     s = sum((Hw-ew.*(1+0.36(1-ew)).*exp[-a*(k.^m).*(1-ew).^n)).^2);
   return
and then use that subfunction for optimization of a, m, and n using 'fminsearch' or 'fminunc'. Their descriptions can be found at:
   http://www.mathworks.com/help/matlab/ref/fminsearch.html
   http://www.mathworks.com/help/optim/ug/fminunc.html
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


