フィルターのクリア

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 Center および File ExchangePulse 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