plot time versus temperature
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have excel file with time and temperature listing.
time temp
13:51:42 30
13:51:44 31
13:51:46 32
13:51:48 34
seconds in the gap of 2 seconds till 58 and temperature in gap of 1. i have to plot the graph of time and temp in matlab. Time on the x axis and Temp on y axis. i read the temp and time by xlsread.
filename= 'temp1.xlsx';
temp=xlsread(filename, 'B:B');
time=xlsread(filename,'A:A');
timestr= datestr(time,'HH:MM:SS');
i tried to read the time in HH:MM:SS format. i got output of timestr as val= 13:51:42 , 13:51:44 ans=d so on uptill 13:51:58.It's written in the output as scalar value . The result is not the matrix . I am unable to plot this scalar quantity with the matrix of temp. Now,how to plot these values. "plot" function alone is not working. pls pls help
2 Kommentare
Image Analyst
am 6 Sep. 2013
You forgot to show your plot line, and explain what's not working (error message, or just not what you expect). Post a screenshot to httpL//snag.gy
Antworten (1)
Walter Roberson
am 6 Sep. 2013
plot(timestr, temp);
datetick('x', 'HH:MM:SS')
2 Kommentare
Walter Roberson
am 7 Sep. 2013
In the excel file, what format is the time in? Please give a couple of lines of sample input.
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!