How to Replace certain elements of table column with corresponding values of another array of different size?
1 回表示 (過去 30 日間)
古いコメントを表示
I have a categorical table variable alloptions.Exp (96399 rows) having such values as:
'Mar1 15'
'Mar1 15'
'Mar1 15'
'Mar1 15'
'Mar 15'
'Mar 15'
'Mar 15'
'Apr1 15'
'Apr2 15'
'Apr 15'
'Apr4 15'
'May1 15'
'May2 15'
'May 15'
'May4 15' ....
and I have a 119x2 Expiration_Table array having these values:
'Mar1 15' '06-Mar-2015'
'Mar2 15' '13-Mar-2015'
'Mar 15' '20-Mar-2015'
'Mar5 15' '31-Mar-2015'
'Apr1 15' '02-Apr-2015'
'Apr2 15' '10-Apr-2015'
'Apr 15' '17-Apr-2015'
'Apr4 15' '24-Apr-2015'
'May1 15' '01-May-2015'
.....
What I need is to create another table variable alloptions.ExpDate having the corresponding values from the Expiration_Table(:,2)
Is there a nicer way to do it by not using loops?
0 件のコメント
回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Tables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!