deleting unneeded columns from tables after using them
Afficher commentaires plus anciens
I need one little help in the follwoing:
the code I attached is supposed to read some files as tables. split a table into smaller tables according to some criteria and store them in a cell array. Now for each table in the cell array we are concerned only with having the two columns of the variables (GDALT and NE8) from a data file, but we also would like to use the fisrt five columns (year,month,day,hour,minute) to generate a date of a table so we can use that to refer to it or search for it in the future.
The attached code is baisically raeding the (GDALT and NE8) columns that we are intreseted in. raed the other five columns (year,month,day,hour,minute) and combines them to have the Date variable added to the table. But this is not effecient because after we have the Date value we don't need the other 5 columns and having them permenentaly would be a waste of storage also, for a specific table the Date value is the same for all the rows so having it for each and every row in the table again would be a waste of storage. So my question comes down to this:
- how can we get rid of the fisrt five columns (year,month,day,hour,minute) after getting the Date value from them?
- would it be possible to store the date value for a table, outside that tables for ex(in the cell next to it in the second column of the cell array), instead of having it for each row in the table?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Data Type Conversion 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!