フィルターのクリア

Select xlim max-value

5 ビュー (過去 30 日間)
Cliff Karlsson
Cliff Karlsson 2018 年 9 月 18 日
編集済み: Jan 2018 年 9 月 18 日
Is it possible to return the xlim max directly with a oneliner? Rigth now I am using:
xmax = xlim
max = xmax(2)
I am guessing that I can access the max-value directly but I can't figure out how.

採用された回答

Fangjun Jiang
Fangjun Jiang 2018 年 9 月 18 日
max() is a function. Don't use it as a variable name.
xmax=max(xlim)

その他の回答 (1 件)

Jan
Jan 2018 年 9 月 18 日
編集済み: Jan 2018 年 9 月 18 日
xmax = max(xlim);
This is slightly more expensive than choosing the 2nd element directly, but is is just one additional comparison, so I'm convinced, that the delay is not serious.
Or:
xmax = xlim * [0; 1];

カテゴリ

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

タグ

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by