Mostrar comentarios más antiguos
よく参考書などで、事前割り当てなどをmatlabでは推奨していますが、変数に空の行列を事前割り当てしている参考書をよく見るのですが、これは一体なんのために割り当てているのでしょうか。
Respuestas (1)
Musashi Ito
el 1 de Dic. de 2020
Editada: Musashi Ito
el 1 de Dic. de 2020
3 votos
2 comentarios
s
el 3 de Dic. de 2020
Musashi Ito
el 4 de Dic. de 2020
Editada: Musashi Ito
el 4 de Dic. de 2020
プログラムの書き方にもよるかと思いますが、もしかしたら for 文の中で、データの抽出や連結などがあり、事前にデータのサイズが分からない。さらに、データの抽出条件によっては空の場合もあり、事前に空のデータを定義しないとデータ型のエラーが発生するようなプログラムのため、かもしれません・・・
Categorías
Más información sobre Resizing and Reshaping Matrices en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!