How many columns can the input to the JacobianMultiplyFcn have?

1 回表示 (過去 30 日間)
Matt J
Matt J 2023 年 1 月 31 日
コメント済み: Matt J 2023 年 2 月 3 日
I am using the JacobianMultiplyFcn option of lsqnonlin. The documentation says that JacobianMultiplyFcn is to be a handle to a function jmfun with the syntax,
W = jmfun(Jinfo,Y,flag)
where,
Y is a matrix that has the same number of rows as there are dimensions in the problem. flag determines which product to compute:
  • If flag == 0 then W = J'*(J*Y).
  • If flag > 0 then W = J*Y.
  • If flag < 0 then W = J'*Y.
However, the documentation does not specify how many columns Y will have. I initially assumed Y will always be a column vector, but after some dbstops, I am seeing that this is sometimes, but not always, the case. In particular, I am seeing a situation where flag=0 and Y is Nx2.
So my question is, how many columns can I expect Y to have in the given input. I need to know this so that,
(a) I can plan the implementation of jmfun.
(b) I can know how much RAM might be required per iteration.
Since this option is supposed to be for large scale problems, it seems silly if Y couldn't be counted upon to be "substantially skinny".
  2 件のコメント
Matt J
Matt J 2023 年 2 月 2 日
So far, I have not seen a case where there are more than 2 columns, but I wonder if that is generally true.
Torsten
Torsten 2023 年 2 月 2 日
A question for the developers, I think.

サインインしてコメントする。

採用された回答

Steve Grikschat
Steve Grikschat 2023 年 2 月 3 日
@Matt J: lsqnonlin trust-region-reflective will only call with either
1) M and N dimensional column vectors,
2) An Mx2 matrix,
where M is the number of elements in "F" returned by your objective function and N is the number of design parameters.
The matrix in (2) is comprised of s1 and s2 described here and is used to form the 2-dimensional trust-region subproblem.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWhos についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by