Matrix sorting and graphical analysis
Afficher commentaires plus anciens
Hello I am not very good at Matlab but I am having a problem figuring out how to code.
So basically I have a excel document with 18+ columns but only the 1st 2nd and 5th column I care about. These columns are Date (in M/D/Y), Shift (1,2, or 3 as an integer), and Net Weight (integer). I want to figure out the total weights for each shift on each day to then put into a line chart. So there would be 3 lines on the chart, the x-axis being date and y-axis being weight.
This needs to be done for 5 different machines in the same excel file but on different workbooks. I am just trying to figure it out for one machine right now. here is the code for my excel data
wt136 = sortrows(xlsread('Waste Tracking.xlsx', '3131-136'),[1 2]);
This however doesn't give me the dates that are in the 1st column of the excel spreadsheet (if anyone knows why please lmk, matlab doesn't even have NaN's in its place just deleted the entire row) so I made another column converting the dates to #'s in excel -- this worked.
But after this stage I am not sure how to procede. I know I should use loops, but can't wrap my head around where to start/where to go. I was thinking of iterating and checking if the dates matched the previous dates for each row but then didn't know how to go after that.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Time Series Objects dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!