convert double array in array string in table
7 views (last 30 days)
Show older comments
it's possible to convert double array in array string in table ?
T.Strategy=[Sis.Sistema].';
data=[Sis.data];%[Eq.data]; % N x size(Sis,2) array datetimes
T.DateF=data(1,:)'; % start date is first each
T.DateL=data(end,:)'; % last date is end each
[r1]=arrayfun(@(s)find(s.dailyprof,1),Sis); %trovo il primo trade
[r2]=arrayfun(@(s)find(s.dailyprof,1,'last'),Sis); %trovo ultimo trade
T.TradeF=arrayfun(@(s,i)s.data(i),Sis,r1)';
T.TradeL=arrayfun(@(s,i)s.data(i),Sis,r2)';
T.Strategy is array string.
T.DateF is array datetime
T.DateL is array datetime
T.TradeF is double array
T.TradeL is double array
2 Comments
Stephen23
on 21 Oct 2023
"it's possible to convert double array in array string in table ?"
Of course:
T = array2table(rand(5,2))
T = convertvars(T,'Var1','string')
Answers (0)
See Also
Categories
Find more on Data Type Conversion 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!