Unable to Rename Columns of Table

2 visualizaciones (últimos 30 días)
Jonathan Messer
Jonathan Messer el 19 de Sept. de 2021
Editada: Cris LaPierre el 19 de Sept. de 2021
So the tried and true method of T.Properties.VarableNames does not seem to be working.
%%Not Working
ecplises = table(eclipseStartTimes, eclipseStopTimes, rot90(repelem({'Eclipse'}, length(eclipseStopTimes))));
eclipses.Properties.VariableNames = {'StartTime', 'StopTime', 'Event'};
%%But this works like a champ
access_target = table(accessStartTimes_target, accessStopTimes_target, ...
rot90(repelem({'Kathmandu'}, length(accessStopTimes_target))), rot90(repelem({'Target'}, length(accessStopTimes_target))),...
rot90(repelem({'27.7172'}, length(accessStopTimes_target))),rot90(repelem({'85.3240'}, length(accessStopTimes_target))),...
rot90(repelem({'1400'}, length(accessStopTimes_target)))); %Create table from Access Times
access_target.Properties.VariableNames = {'StartTime', 'StopTime', 'Event', 'Target', 'Latitude', 'Longitude', 'Altitude'};

Respuesta aceptada

Cris LaPierre
Cris LaPierre el 19 de Sept. de 2021
Editada: Cris LaPierre el 19 de Sept. de 2021
The reason the first one isn't working is because you have a typo. Look at how you spell eclipses
  • ecplises = ...
  • eclipses.Prop...

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by