0
本質上我想讓fminsearch運行在各種參數上。Matlab在for循環中運行參數化的fminsearch?
所以我有代碼運行的以下snipet:
%Setting up the changeable WIRX parameters:
L = 0.15; %Length along the electrodes in meters
I = 3000; %Current in amps
%Running the fminsearch:
TeNe = fminsearch(@(params) TeNe(params,L,I),[5,1.5e21],optimset('MaxFunEvals', 100000,'MaxIter', 100000));
我想要做的是能在同值的L和I的陣列上運行for循環但是後來我發現是,我甚至無法連續運行這段代碼連續兩次得到錯誤:
Subscript indices must either be real positive integers or logicals.
任何有識之士將不勝感激!