plot when x variables are "strings"
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
alpedhuez
el 26 de Mayo de 2020
I have created a following csv file
Column 1 "EST 9AM (PST 6AM)", "EST 10AM (PST 7AM)",...
Column 2 Temperature at these time
I read the file in Matlab and tried to plot them. But the error message is that "Error Using Plots: Invalid Data Argument."
0 comentarios
Respuesta aceptada
SayedPedram Hosseini
el 26 de Mayo de 2020
You've got to change the data type to datetime. First fecht the date column with this:
T = readtable(filename)
then change it to datetime to any format that you need. like:
T.LocalTime.Format = 'MM/dd/uuuu HH:mm:ss'
you find additional information on the documentation of datetime here: https://de.mathworks.com/help/matlab/ref/datetime.html
1 comentario
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!