financial time series object - how to delete a column?
Show older comments
One might have:
dt =
desc: (none)
freq: Daily (1)
'dates: (2715)' 'times: (2715)' 'Open: (2715)' 'High: (2715)' 'Low: (2715)' 'Close: (2715)' 'Vol: (2715)' 'OI: (2715)'
'19-Mar-2006' '22:00' [ 1164.25] [ 1186.5] [ 1160.5] [ 1183.75] [ 1149131] [ 1064369]
With both a dates and a times column ... to remove the times column one could think of:
dt_Close = fints(dt.dates, fts2mat(dt.Close))
This removes the times but gives only one column back ... I'd like to keep all columns and remove only the "times" column. So:
Is column indexing by column position (instead of column name) possible? This can be done for rows as:
dt([1 2 3]) % get only first 3 rows
dt([1 3:end]) % skip row 2
as described in another post here .... how can this be done for columns?
Accepted Answer
More Answers (1)
Andy
on 18 Mar 2017
Categories
Find more on Platform and License in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!