Path: news.mathworks.com!not-for-mail
From: "Noah Snavely" <jimantha@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: logical, sparse JacobPattern as argument to lsqnonlin?
Date: Sun, 8 Nov 2009 22:57:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 10
Message-ID: <hd7ibt$1nm$1@fred.mathworks.com>
Reply-To: "Noah Snavely" <jimantha@gmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257721021 1782 172.30.248.35 (8 Nov 2009 22:57:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 8 Nov 2009 22:57:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1849214
Xref: news.mathworks.com comp.soft-sys.matlab:583418


Hi everyone,

I'm running a large, non-linear optimization problem using lsqnonlin, and memory is becoming an issue.  I'm passing in a sparsity pattern matrix as the JacobPattern, but for memory reasons I'd like to pass it as a sparse, logical matrix, rather than a sparse matrix of doubles (I can't think of any reason why a logical wouldn't suffice).  However, lsqnonlin complains that:

"Invalid value for OPTIONS parameter JacobPattern: must be a matrix."

Is it possible to convince lsqnonlin to take in a logical matrix as the JacobPattern, or is there a reason why I shouldn't be trying this?

Thanks,
Noah