'Text' must be character vector issue in app designer
Afficher commentaires plus anciens
Hi, I'm quite new to MATLAB so please bare with me. I'm assigning the values produced by MATRIX_VALUES from a seperate script to the button names seen below, but I keep getting an 'Text' must be a character vector error on the btn.Text = C{i} line. MATRIX_VALUES(); is a 4x4, and I shaped it to a 1x16 vector, which should fit the loop conditions fine, but I keep getting this error. Any help would be massively appreicated, thanks.
MATRIX_VALUES();
x = reshape(FINAL_Shuffled_Columns,1,[]);
C = {x}; %Making a cell with the matrix of values from MATRIX_VALUES
mybuttons = {app.Button1,app.Button2,app.Button3,app.Button4,...
app.Button5,app.Button6,app.Button7,app.Button8,...
app.Button9,app.Button10,app.Button11,app.Button12,...
app.Button13,app.Button14,app.Button15,app.Button16};
for i = 1:16
btn = mybuttons{i};
btn.Text = C{i};
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Develop Apps Using App Designer dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!