I try to make a project for college. My task is to enter in the EditFields(Text) two separate values for the 3 examples below. If it's a scalar, I have to enter 2 numbers, if it's a vector(array) to enter 2 arrays and if it's a matrix, to enter 2 matrixes. Everything went well until I try to enter 2 arrays or matrixes in the EditFields(Text). I tried different ways like [1, 2, 3] or [1 2 3] or 1 2 3 etc, but every time I got either the error
Error setting property 'Data' of class 'Table': Data within a cell array must have size [1 1]
or
Error setting property 'Data' of class 'Table': Values within a cell array must be numeric, logical, or char
The results should be shown into the table from bottom right. I tried to convert the values like this:
newRow = {selectedFunction, result};
if isnumeric(result)
newRow{2} = result;
elseif ischar(result)
newRow{2} = {result};
else
uialert(app.UIFigure, 'Eroare: Tip de date neacceptat pentru adăugarea la tabel!', 'Eroare', 'Icon', 'error');
return;
end
app.ResultTable.Data = [app.ResultTable.Data; newRow];
Any suggestions?