How to delete a row from a Financial Time Series?

Hi,
This seems like such a simple action, but I can't find an answer. How do I delete rows from a fints object?
With a matrix I just use: mat1(3:4,:)=[];
But, that doesn't work with fints. I suppose one could do this with the data table app, but I need a command line option.
Thanks in advance!

 採用された回答

Brendan Hamm
Brendan Hamm 2015 年 3 月 3 日
編集済み: Brendan Hamm 2015 年 3 月 3 日

1 投票

tsobjkt = tsobjkt([1 3:end]); % Just overwrite it with second obs removed

その他の回答 (2 件)

Shoaibur Rahman
Shoaibur Rahman 2015 年 3 月 3 日

1 投票

This works here, delete rows 2 from 4:
A = [1 2 3; 4 5 6; 7 8 9; 2 4 6; 1 3 5];
A(2:4,:)=[]
When using your code, do you get any error message?
PNWmatlab
PNWmatlab 2015 年 3 月 3 日

1 投票

For example:
% example of fints issue data=[1:6]'; dates=[today:today+5]'; tsobjkt=fints(dates,data);
tsobjkt(2) ans =
desc: (none)
freq: Unknown (0)
'dates: (1)' 'series1: (1)'
'04-Mar-2015' [ 2]
tsobjkt(2)=[]
Matlab says: Error using fints/subsasgn (line 239) The right hand side data has either too many columns or not enough columns compared to data replaced on left hand side.

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

タグ

質問済み:

2015 年 3 月 3 日

編集済み:

2015 年 3 月 3 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by