変数名が連続的なときのfor文を用いたプロット
4 views (last 30 days)
Show older comments
変数名がO1,O2,O3,...とOのあとの数字が連続的になっているとき,for文を用いてプロットすることはできるでしょうか。
evalを用いればできるのではないかと思うのですが,O1,O2,O3が行列の場合,どのようにプロットしたい箇所を指定すればよいのか
分かりません。
宜しくお願い致します。
1 Comment
madhan ravi
on 3 Sep 2020
This is why naming variables is a bad idea. Look https://www.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should-not-be-named-dynamically-eval
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!