Question
I am facing difficulties in plotting my time series data. I write code like this but doesnt work. data3=readtable ('PRICE_AND_DEMAND_Jan.csv') Date_Time = data3(:,2); datecell=table2cell(Date_Time); load = data3(:,3); A = table2array(load) p=datenum(datecell); plot(datenum(datecell), A) datetick('x', 'dd-mmm-yyyy HH:MM:SS') % datetick('x', 'dd-mmm-yyyy HH:MM:SS')
Expert Answer
John Williams
PhD Expert
Answered Aug 24, 2026
try it:
data3=readtable ('PRICE_AND_DEMAND_Jan.csv')
Date_Time = data3(:,2);
datecell=table2cell(Date_Time);
load = data3(:,3);
A = table2array(load)
formatIn='dd-mm-yy HH:MM'
p=datenum(datecell,formatIn);
plot(p, A)
datetick('x', 'dd-mmm-yyyy HH:MM')
set(gca,'XTickLabel',datestr(p),'XMinorGrid','on')
grid
100% Run Guarantee
3-Hour Fast-Track Delivery
Need a Custom Version or Complete Simulation for This Problem?
Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.
Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here
Related plot Questions & Solutions
Browse All →
Explore similar technical troubleshooting questions and verified MATLAB solutions:
Ready-to-Run MATLAB & Simulink Projects
Browse All Projects →