Can I make this line of code smaller?
1 回表示 (過去 30 日間)
古いコメントを表示
if isempty(XBest) XBest = 1e8; end
0 件のコメント
採用された回答
Askic V
2023 年 3 月 3 日
XBest=[2, 3, 4];
XBest(isempty(XBest)) = 1e8;
XBest
XAest = [];
XAest(isempty(XAest)) = 1e8;
XAest
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!