'σ' is not a valid table variable name.
    8 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Knut Jørgen
 el 16 de Ag. de 2019
  
    
    
    
    
    Comentada: Knut Jørgen
 el 19 de Ag. de 2019
            I got this error when I wants to use 'σ' as variable name,  is not a valid table variable name.
I have used  these commands as I do no have excel on my Linux pc.
 tbl = array2table(TABLE);
   writetable(tbl,'TABLE.xls')
This works but I get this as headers 
  TABLE1             TABLE2      TABLE3      TABLE4      TABLE5      TABLE6       TABLE7      TABLE8       TABLE9      TABLE10     TABLE11
not this 
 {'information'}    {'EER'}    {'σ'} 
But if I change the variable name to this {'information'}    {'EER'}    {'σ'} I get this error
'σ' is not a valid table variable name.
How can I use 'σ' as variable name as this is possible in windows with excel and xlswrite.
0 comentarios
Respuesta aceptada
  Guillaume
      
      
 el 16 de Ag. de 2019
        The problem is not excel but matlab, which currently only allows valid matlab variable names as table variables. For the moment, the only workaround is to convert your table to a cell array and append the header with whatever you want as the first row of the cell array. Assuming, R209a, you can then use writecell. In earlier versions, xlswrite.
c = table2cell(yourtable);
writecell([{'Information', 'EER', 'σ', 'morenames'}; c], 'C:\somewhere\somefile.xlsx')
Más respuestas (0)
Ver también
Categorías
				Más información sobre Tables en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
