空行列の作成の利点
60 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
よく参考書などで、事前割り当てなどをmatlabでは推奨していますが、変数に空の行列を事前割り当てしている参考書をよく見るのですが、これは一体なんのために割り当てているのでしょうか。
0 commentaires
Réponses (1)
Musashi Ito
le 1 Déc 2020
Modifié(e) : Musashi Ito
le 1 Déc 2020
2 commentaires
Musashi Ito
le 4 Déc 2020
Modifié(e) : Musashi Ito
le 4 Déc 2020
プログラムの書き方にもよるかと思いますが、もしかしたら for 文の中で、データの抽出や連結などがあり、事前にデータのサイズが分からない。さらに、データの抽出条件によっては空の場合もあり、事前に空のデータを定義しないとデータ型のエラーが発生するようなプログラムのため、かもしれません・・・
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!