automating many column headings in table
I have a 10000×400 matrix, plotphys, I want to turn into a table and add variable names to. I understand that can be done easily with the array2table function. However adding 400 headings is a lot; luckily I want the headings uniform in that they would be labeled
‘phys state at tstep 1’, ‘phys state at tstep 2’, …, ‘phys state at tstep 400’
Is there a way I can basically automate the creation of the headings?
I tried this
head = join("phys state at tstep " + [1:1:400]);
phystable = array2table(plotphys, ‘VariableNames’, {head});
but that did not workI have a 10000×400 matrix, plotphys, I want to turn into a table and add variable names to. I understand that can be done easily with the array2table function. However adding 400 headings is a lot; luckily I want the headings uniform in that they would be labeled
‘phys state at tstep 1’, ‘phys state at tstep 2’, …, ‘phys state at tstep 400’
Is there a way I can basically automate the creation of the headings?
I tried this
head = join("phys state at tstep " + [1:1:400]);
phystable = array2table(plotphys, ‘VariableNames’, {head});
but that did not work I have a 10000×400 matrix, plotphys, I want to turn into a table and add variable names to. I understand that can be done easily with the array2table function. However adding 400 headings is a lot; luckily I want the headings uniform in that they would be labeled
‘phys state at tstep 1’, ‘phys state at tstep 2’, …, ‘phys state at tstep 400’
Is there a way I can basically automate the creation of the headings?
I tried this
head = join("phys state at tstep " + [1:1:400]);
phystable = array2table(plotphys, ‘VariableNames’, {head});
but that did not work table, headings MATLAB Answers — New Questions