Reading Loop-Generated Editfields (Without using AppDesigner)

1 ビュー (過去 30 日間)
Jack Georege
Jack Georege 2021 年 4 月 21 日
I recently learned about the uifigure-based way of coding a GUI programmatically.
I cannot use AppDesigner for this specific project.
In order to keep my code consice I have created a loop to create my 5 editfields
for K = 1:5
txtp1(K) = uieditfield(f, 'Position', [(90+((K-1)*30)) 330 30 30], 'ValueChangedFcn', _________);
end
Where I put the underscores is where I'm having trouble, as while I can make a function for a single text field, I'm getting errors left and right trying to create said function. The function is supposed to read what's in the editfields and output it to an array None of the documentation that i've read on the uieditfield shows how to create this function when the editfield is generated by a loop.

回答 (0 件)

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by