What is it called when I specify a vector output of solutions from, say, fsolve?

2 ビュー (過去 30 日間)
Noob
Noob 2020 年 10 月 2 日
コメント済み: Rik 2020 年 10 月 2 日
Hi,
I have a simple question -- just a matter of lingo, I think:
The fsolve algorithm gives all these outputs when it arrives at a solution:
[ x, fval, exit_flag, output, Jacobian ]
If I only write code such as
x = fsolve(f, x_guess)
then I get simply the solution from fsolve.
But if I write
[x, fval] = fsolve(f, x_guess)
then I get both the solution as well as the function evaluation at that solution.
And ditto for exit_flag, output, Jacobian.
What is this process called, when I enlarge the vector output to specify what I want the code to bring back?
Sorry, I know it's a very basic question, but I just want to use the correct lingo.
Thanks,

採用された回答

Rik
Rik 2020 年 10 月 2 日
Those are called output arguments. Sometimes functions will use the nargout function to determine which calculations should be performed.
  2 件のコメント
Noob
Noob 2020 年 10 月 2 日
編集済み: Noob 2020 年 10 月 2 日
Ah, ok - so it's just me specifying the output arguments. Thanks for the quick answer, Rik!
Rik
Rik 2020 年 10 月 2 日
Exactly. You're welcome.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by