Info
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
insert times file as a matrix
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hello, I have the following time file and I want to put the values into a matrix to plot it with another variable.
I tried to use this function,
T=load('time.txt','-ascii');
but Matlab load only the hours' values, I want to consider the minutes' values also.
0 Commenti
Risposte (3)
Walter Roberson
il 25 Set 2017
fileID = fopen('Uz10.txt');
Uz10_cell = textscan(fileID,'%{HH:MM}D');
fclose(fileID);
Uz10 = timeofday(Uz10_cell{1});
This will give you a "duration" object. Duration objects can be used as the x axis values from roughly R2015b onwards.
0 Commenti
Questa domanda è chiusa.
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!