필터 지우기
필터 지우기

How to read a variable in set_param function?

조회 수: 2 (최근 30일)
loay al-azri
loay al-azri 2019년 2월 21일
답변: Monika Jaskolka 2021년 3월 1일
Iam having aproblem reading a value from a file and put it inside Set_param function. This is my code where here i get the value of A from a txt file but i want to put A in Set_param. when the simulink open it shows A not the value of A in the model.
open_system('Transient.slx')
A = dlmread('C:\xampp\htdocs\RCE\MATLAB\FYP_expirement\SpeedControl\exp_value.txt');
set_param('Transient/Gain','Gain','A')

답변 (1개)

Monika Jaskolka
Monika Jaskolka 2021년 3월 1일
set_param('Transient/Gain', 'Gain', A)

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by