‘Text’ must be character vector issue in app designer
Hi, I’m quite new to MATLAB so please bear 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 4×4, and I shaped it to a 1×16 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};
endHi, I’m quite new to MATLAB so please bear 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 4×4, and I shaped it to a 1×16 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 Hi, I’m quite new to MATLAB so please bear 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 4×4, and I shaped it to a 1×16 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 appdesigner, button MATLAB Answers — New Questions