フィルターのクリア

Integrate the input of an EditField in AppDesign into the code

1 回表示 (過去 30 日間)
Yency Perez
Yency Perez 2021 年 4 月 25 日
編集済み: Yency Perez 2021 年 4 月 25 日
Hello everyone,
I would like to first say thank you for any help provided :)
I have two EditFields in my GUI (the app designer) and i would like to multiply what the user inputs to create a while loop:
TTime = app.TotalTimeEditField; %Time the user chooses
FPSec = app.FPSEditField; %Amount of frames the user would like
app.frames = TTime * FPSec; %Calculating Frames per Second
while 1:lenght(app.frames) %While 1:the amount of frames already calculated based on what the user has inputted
...
I am not sure why it does not let me multiply, how can I correct this? I get this error on my "Calculating Frames per Second" line:
Undefined function 'mtimes' for input arguments of type 'matlab.ui.control.EditField'.

採用された回答

Yency Perez
Yency Perez 2021 年 4 月 25 日
編集済み: Yency Perez 2021 年 4 月 25 日
I needed to access the values stored on the fields:
TTime = app.TotalTimeEditField.Value; %Time the user chooses
FPSec = app.FPSEditField.Value; %Amount of frames the user would like
app.frames = TTime .* FPSec; %Calculating Frames per Second
I hope this helps anyone else!

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWhos についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by