outputs from lsqlin parameter estimation

4 次查看(过去 30 天)
Hi
I am working on using 'lsqlin' for fitting my 3 parameters (a set of 3) in my model.
This is the command I used: k=lsqlin(stackedmatrix{:},ftderivativesofP,LB,UB)
Where k is output to store my estimated parameters. each of stackedmatrix{index} contains a square matrix (3X3) where index=1 to 189.
ftderivativesofP is a column vector (no.of rows=189). LB variable for setting lower bounds, I did: LB=0.00001*ones(3,1)
and UB for upper bounds. set as : UB=100000*ones(3,1)
Output I am getting is the following, with a bunch of warning messages:
Warning: Length of lower bounds is > length(x); ignoring extra bounds. > In checkbounds at 28 In lsqlin at 236 Warning: Length of upper bounds is > length(x); ignoring extra bounds. > In checkbounds at 42 In lsqlin at 236 Exiting due to infeasibility: 1 lower bound exceeds the corresponding upper bound.
k =
1.0e+03 *
-9.9275
-9.9275
9.9275
0
0.9996
0.9996
-0.9996
0
0
0
-0.0004
0.0004
(My main) Question is : Why am I getting 12 estimated values, as there are only 3 parameters to be estimated.
Also, any guidance for the reasoning behind these warning messages would be helpful for me.
Thanks in advance

采纳的回答

Matt J
Matt J 2013-10-3
编辑:Matt J 2013-10-3
You seem to be disregarding the documentation as to which order the input arguments are to be given in. If you look again at "doc lsqlin" you will see that LB and UB are supposed to be the 7th and 8th inputs, not the 3rd and 4th.
Aside from that
lsqlin(stackedmatrix{:},arg1,arg2,...)
is equivalent to typing
lsqlin(stackedmatrix{1}, stackedmatrix{2}, stackedmatrix{3},...,stackedmatrix{end}, arg1, arg2,...)
If this is really what you are doing, no doubt it is contributing to the problem.
  4 个评论
SreeHarish Muppirisetty
Hi Matt
I formed a matrix from my stacked cell array using cell2mat.
Now when I execute lsqlin as
k=lsqlin(stackedarray,ftderivativesofP,[],[],[],[],lb,ub,X0,options) where options is set as:
options = optimoptions('lsqlin','MaxIter',500000000); and
X0=[0.000000001;0.000000001;0.000000001];
I get the following Error:
Error using lsqlin (line 188) The number of rows in C must be equal to the length of d.
Matt J
Matt J 2013-10-4
编辑:Matt J 2013-10-4
It's because stackedarray has more rows than ftderivativesofP

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Linear Least Squares 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by