fminsearch ''index exceeds matrix dimensions''
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I am trying to find an optimal fit to my impedance spectroscopy measurement data using fminsearch
When I am running the code I am getting the following error
??? Index exceeds matrix dimensions.
Error in ==> @(x)myfun1(x,omega_s,Z_60(start:stop),Rinit)
Error in ==> fminsearch at 205 fv(:,1) = funfcn(x,varargin{:});
Error in ==> SOH31_Script_V4 at 152 [Y ERR] = fminsearch(@(x) myfun1(x,omega_s,Z_60(start:stop),Rinit),X0,options)
I think the error is due to the start and stop value I am using. I have the measurement of impedances (real, imaginary and the frequencies) for a large range of frequencies (10 mHz to 50kHz)
myfun1 is the error function I am minimizing
I am trying to fit this data to a model. I don't want the optimization problem to run for all frequencies so i want to restrict the start stop to a mid frequency range.
How can I select start and stop?
All the real, imaginary and frequencies are of size 68X1 double
Thanks!
0 Commenti
Risposta accettata
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Nonlinear Optimization in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!