How to assign start value to lower and upper bound in lsqnonlin
3 views (last 30 days)
Show older comments
Hi there,
I have been facing a problem in solving my problem through lsqnonlin. The main problem is the lower and upperbound values. I supply vector of 10 elements for upper and lower bound.
The problem is that i want to change the start position/value in both the upper and lower bound vectors. for e.g.
%
lb = ones(length(coef), 1) * -1; %lower boundaries:
ub = ones(length(coef), 1); % upper boundaries:
lb(1:4) =-1000;
ub(1:4) =1000;
%
Since the lb(1) = -1000 and ub(1) = 1000. They will run from 1 to 1000. I want to change the start value from 1 to some different value. Does anyone has idea what should i do or where to look in the source code or any alternate ideas?
Thanks..
0 Comments
Answers (1)
Matt J
on 5 Jul 2013
Is this what you want?
positions=startvalue+(0:3);
lb(positions)=-1000;
ub(positions)=1000;
0 Comments
See Also
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!