How to search for table column via a string
I’m trying to assign a column in rawTable with a specific header to variable ‘y’ and I’m using the string to locate and assign the values but I keep getting errors. Any way I can assign the string as a variable instead?
for i = 1:size(Sheets)
rawTable = readtable(‘TypeA vs. Type C.xlsx’,’Sheet’,Sheets(i,1));
x = rawTable.Time;
figure;
string = strcat(Types(t,1),’_’,Conditions(c,1),’_’,Muscles(m,1));
y = rawTable.string;
plot(x,y);
Error using .
Unrecognized table variable name ‘string’.
y = rawTable.string;I’m trying to assign a column in rawTable with a specific header to variable ‘y’ and I’m using the string to locate and assign the values but I keep getting errors. Any way I can assign the string as a variable instead?
for i = 1:size(Sheets)
rawTable = readtable(‘TypeA vs. Type C.xlsx’,’Sheet’,Sheets(i,1));
x = rawTable.Time;
figure;
string = strcat(Types(t,1),’_’,Conditions(c,1),’_’,Muscles(m,1));
y = rawTable.string;
plot(x,y);
Error using .
Unrecognized table variable name ‘string’.
y = rawTable.string; I’m trying to assign a column in rawTable with a specific header to variable ‘y’ and I’m using the string to locate and assign the values but I keep getting errors. Any way I can assign the string as a variable instead?
for i = 1:size(Sheets)
rawTable = readtable(‘TypeA vs. Type C.xlsx’,’Sheet’,Sheets(i,1));
x = rawTable.Time;
figure;
string = strcat(Types(t,1),’_’,Conditions(c,1),’_’,Muscles(m,1));
y = rawTable.string;
plot(x,y);
Error using .
Unrecognized table variable name ‘string’.
y = rawTable.string; string, table, variable MATLAB Answers — New Questions