for文にテキストボックスの値を入れてループさせる方法を教えてください。
Afficher commentaires plus anciens

私はfor文入る前にtest_dataの内容をそれぞれ代入し、for文で1つずつ回るのではないかと考えていました。しかしこれではY(from,to)の中にいれてしまうと(from,to)すべての場所に同じ値が入ってしまうという結果になりました。
Y =
0.0400 - 1.7992i 0.0400 - 1.7992i 0.0400 - 1.7992i 0.0400 - 1.7992i
0.0400 - 1.7992i 0.0400 - 1.7992i 0.0400 - 1.7992i 0.0400 - 1.7992i
0.0400 - 1.7992i 0.0400 - 1.7992i 0.0400 - 1.7992i 0.0400 - 1.7992i
0.0400 - 1.7992i 0.0400 - 1.7992i 0.0400 - 1.7992i 0.0400 - 1.7992i
Y(3,1)の場合は本来想定している結果はfrom3,to1の場合は0になるはずなのにほかの値と同じになってしまっています。
Y =
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i
0.0400 - 1.7992i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i
なので、テキストボックスから値を取り出してfor文で回す方法が知りたいです。お願いします。
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!