Ältere Kommentare anzeigen
よく参考書などで、事前割り当てなどをmatlabでは推奨していますが、変数に空の行列を事前割り当てしている参考書をよく見るのですが、これは一体なんのために割り当てているのでしょうか。
Antworten (1)
Musashi Ito
am 1 Dez. 2020
Bearbeitet: Musashi Ito
am 1 Dez. 2020
3 Stimmen
2 Kommentare
s
am 3 Dez. 2020
Musashi Ito
am 4 Dez. 2020
Bearbeitet: Musashi Ito
am 4 Dez. 2020
プログラムの書き方にもよるかと思いますが、もしかしたら for 文の中で、データの抽出や連結などがあり、事前にデータのサイズが分からない。さらに、データの抽出条件によっては空の場合もあり、事前に空のデータを定義しないとデータ型のエラーが発生するようなプログラムのため、かもしれません・・・
Kategorien
Mehr zu Resizing and Reshaping Matrices finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!