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

私は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文で回す方法が知りたいです。お願いします。
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!