Can I make this line of code smaller?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Ishan Gawai
am 3 Mär. 2023
Beantwortet: Askic V
am 3 Mär. 2023
if isempty(XBest) XBest = 1e8; end
0 Kommentare
Akzeptierte Antwort
Askic V
am 3 Mär. 2023
XBest=[2, 3, 4];
XBest(isempty(XBest)) = 1e8;
XBest
XAest = [];
XAest(isempty(XAest)) = 1e8;
XAest
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!