How to use fminsearch for vectors
I searched for prior discussions on fminsearch, including one on "How to use fminsearch for a vector" and did not find what I am looking for.
I have two somewhat independent vectors of measured values, A and B. Is the optimisation a linear domain or a plane? I have had a quick look at optimvar, fminsearch, fmincon, and fminbnd and have not secured a result. Error on fminsearch is " Maximum number of function evaluations has been exceeded". Is there a more appropriate function than fminsearch? Thank you.
rng(‘shuffle’);
A = rand(1,10); % proxy for measured values
B = rand(1,10); % proxy for independent measured values
fun = @(ratio) min(sum(A.*ratio – B));
ratioRange = [1.0,1.2];
ratio = fminsearch(fun,ratioRange);I searched for prior discussions on fminsearch, including one on "How to use fminsearch for a vector" and did not find what I am looking for.
I have two somewhat independent vectors of measured values, A and B. Is the optimisation a linear domain or a plane? I have had a quick look at optimvar, fminsearch, fmincon, and fminbnd and have not secured a result. Error on fminsearch is " Maximum number of function evaluations has been exceeded". Is there a more appropriate function than fminsearch? Thank you.
rng(‘shuffle’);
A = rand(1,10); % proxy for measured values
B = rand(1,10); % proxy for independent measured values
fun = @(ratio) min(sum(A.*ratio – B));
ratioRange = [1.0,1.2];
ratio = fminsearch(fun,ratioRange); I searched for prior discussions on fminsearch, including one on "How to use fminsearch for a vector" and did not find what I am looking for.
I have two somewhat independent vectors of measured values, A and B. Is the optimisation a linear domain or a plane? I have had a quick look at optimvar, fminsearch, fmincon, and fminbnd and have not secured a result. Error on fminsearch is " Maximum number of function evaluations has been exceeded". Is there a more appropriate function than fminsearch? Thank you.
rng(‘shuffle’);
A = rand(1,10); % proxy for measured values
B = rand(1,10); % proxy for independent measured values
fun = @(ratio) min(sum(A.*ratio – B));
ratioRange = [1.0,1.2];
ratio = fminsearch(fun,ratioRange); fminsearch, vectors MATLAB Answers — New Questions