フィルターのクリア

Can I make this line of code smaller?

1 回表示 (過去 30 日間)
Ishan Gawai
Ishan Gawai 2023 年 3 月 3 日
回答済み: Askic V 2023 年 3 月 3 日
if isempty(XBest) XBest = 1e8; end

採用された回答

Askic V
Askic V 2023 年 3 月 3 日
XBest=[2, 3, 4];
XBest(isempty(XBest)) = 1e8;
XBest
XBest = 1×3
2 3 4
XAest = [];
XAest(isempty(XAest)) = 1e8;
XAest
XAest = 100000000

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by