LSQLIN Implementation with Sparse Matrices
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Nolan Pell
el 25 de Feb. de 2015
Comentada: Nolan Pell
el 26 de Feb. de 2015
I am considering updating to R2014b and just have a quick question about the implementation of the LSQLIN function. Are sparse matrices supported for all algorithms and solution constraint types (inequality, equality, bound) with this function in 2014b? This was not the case in 2012b. I could not readily find the answer to this in the LSQLIN documentation or the "Choosing the Algorithm" document. Thanks for any information anyone can provide.
0 comentarios
Respuesta aceptada
Matt J
el 25 de Feb. de 2015
No, not for all algorithms. The following test in R2014b confirms this.
>> C=speye(3); d=sparse([3;2;1]); A=C; b=d; lsqlin(C,d,A,b)
Warning: The trust-region-reflective algorithm can handle bound constraints only;
using active-set algorithm instead.
> In lsqlin at 304
Warning: Cannot use sparse matrices with active-set algorithm: converting to full.
> In lsqlin at 353
Optimization terminated.
ans =
3
2
1
The strange thing, however, is that in R2013b, the active-set algorithm handles sparse input just fine, or at least it does not return a warning as above,
>> C=speye(3); d=sparse([3;2;1]); A=C; b=d; lsqlin(C,d,A,b,[],[],[],[],[],optimoptions(@lsqlin,'Algorithm','active-set'))
Optimization terminated.
ans =
3
2
1
Más respuestas (0)
Ver también
Categorías
Más información sobre Linear Least Squares en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!