Why not test it yourself? The simplest way to answer a question like this (and the FASTEST way) is a simple test when you are not sure.
lsqlin(rand(10,10),rand(10,1),rand(3,10),rand(3,1),[],[],zeros(10,1),ones(10,1))
Warning: The trust-region-reflective algorithm can handle bound constraints only;
using active-set algorithm instead.
> In lsqlin (line 300)
Optimization terminated.
ans =
0.32162
0
0
0
0
0
0
0.16786
0
0.2514
The answer is yes, of course. No statement in the help is made that M MUST be greater than N. It is probably true that most of the time, one would have M>N to use lsqlin.
Best Answer