필터 지우기
필터 지우기

Taking a system as input in MATLAB App Designer

조회 수: 1 (최근 30일)
Krishnaraja Sagar
Krishnaraja Sagar 2020년 11월 26일
I need to extract a system function from the data typed by the user into a text box.
function out_sig = systemSelector(app,x,t)
sys_strstart = '@(x,t)';
sys_string = app.SystemyEditField.Value;
sys_string = strcat(sys_strstart,sys_string);
sys_handler = str2func(sys_string);
out_sig = sys_handler(x,t);
end
This is the function I wrote which takes the input provided by the user in terms of x and t.
But, for this to work, I have to provide strings like 't.*x' and '(t.*3).*(x.^2)' which are not user-friendly. Besides the user cannot enter systems which have a delay, like 'x(t-5)'.
Can anyone please suggest a new function or update my existing function so that I can take the input in a better manner?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Pulse and Transition Metrics에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by