Inserting additional data in an already created table
Hello, Im messing around with tables again and create one from the user inputs from inputdlg
prompt = {‘Soak(s)’,’Soak Move (ymm)’,’Laser Volts (Soak, Image)’,’numImages(afterSOAK)’,’ZTLpos(soak), abs’,’Back To Nominal Wait Time(s)’,’NumImages (Back To Nominal)’};
dlgtitle = ‘Laser Soak’;
dims = [1 35];
definput = {’30’,’-1′,’2, 0.18′,’4′,’-1833′,’60’,’12’};
answer = inputdlg(prompt,dlgtitle,dims,definput);
answer
T = table(char(answer))
I want to add another entry to the end and thought this would do it
defaultZTL=’-2000′;
T(end+1,1)={defaultZTL}
But Im getting this error
Assigning to a character variable in a table is only supported when the right-hand side value is a table. Consider using a string
variable in the table for text data.
Error in HTS_TestSoftware/LaserSOAKButtonPushed (line 12557)
T(end+1,1)={defaultZTL}Hello, Im messing around with tables again and create one from the user inputs from inputdlg
prompt = {‘Soak(s)’,’Soak Move (ymm)’,’Laser Volts (Soak, Image)’,’numImages(afterSOAK)’,’ZTLpos(soak), abs’,’Back To Nominal Wait Time(s)’,’NumImages (Back To Nominal)’};
dlgtitle = ‘Laser Soak’;
dims = [1 35];
definput = {’30’,’-1′,’2, 0.18′,’4′,’-1833′,’60’,’12’};
answer = inputdlg(prompt,dlgtitle,dims,definput);
answer
T = table(char(answer))
I want to add another entry to the end and thought this would do it
defaultZTL=’-2000′;
T(end+1,1)={defaultZTL}
But Im getting this error
Assigning to a character variable in a table is only supported when the right-hand side value is a table. Consider using a string
variable in the table for text data.
Error in HTS_TestSoftware/LaserSOAKButtonPushed (line 12557)
T(end+1,1)={defaultZTL} Hello, Im messing around with tables again and create one from the user inputs from inputdlg
prompt = {‘Soak(s)’,’Soak Move (ymm)’,’Laser Volts (Soak, Image)’,’numImages(afterSOAK)’,’ZTLpos(soak), abs’,’Back To Nominal Wait Time(s)’,’NumImages (Back To Nominal)’};
dlgtitle = ‘Laser Soak’;
dims = [1 35];
definput = {’30’,’-1′,’2, 0.18′,’4′,’-1833′,’60’,’12’};
answer = inputdlg(prompt,dlgtitle,dims,definput);
answer
T = table(char(answer))
I want to add another entry to the end and thought this would do it
defaultZTL=’-2000′;
T(end+1,1)={defaultZTL}
But Im getting this error
Assigning to a character variable in a table is only supported when the right-hand side value is a table. Consider using a string
variable in the table for text data.
Error in HTS_TestSoftware/LaserSOAKButtonPushed (line 12557)
T(end+1,1)={defaultZTL} table MATLAB Answers — New Questions