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 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!