Add_lineをforで繰り返し処理したい。
4 views (last 30 days)
Show older comments
YN
on 24 Jun 2022
Commented: Toshinobu Shintai
on 24 Jun 2022
In1とOut1を、In2とOut2を•••というふうにブロックを、add_lineで自動結線をしていきたいです。具体的にはforを使ってnをインクリメントしていき、端子番号の指定をnでできるようにしたいです。何か方法はありますでしょうか。
0 Comments
Accepted Answer
Toshinobu Shintai
on 24 Jun 2022
例えば以下のように、増える数値を文字列に変えることができます。このようにして作成された文字をadd_lineの引数に指定し、実行させることができます。
for i = 1:10
text = "In" + num2str(i) + "/1";
disp(text);
end
More Answers (0)
See Also
Categories
Find more on グラフィックス オブジェクトの識別 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!