set_param の使い方
Show older comments
get_param でオブジェクトから取り出した文字列を変更して set_param で格納したいのですがうまくいきません。
構文はこうです。for文でijを回しています。
tmp2_sname = get_param(bh_1st{ij}, 'Name');
tmp2_sname = extractBefore(tmp2_sname, "_");
set_param(bh_1st{ij}, 'Name', tmp2_sname);
tmp3_sname = get_param(bh_1st{ij}, 'Name');
最後の1行でエラーになります。最後から2行目でオブジェクトに格納できていないようです。
オブジェクトに格納できないのは何故でしょうか。
Accepted Answer
More Answers (0)
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!