フィルターのクリア

convert double array in array string in table

13 ビュー (過去 30 日間)
aldo
aldo 2023 年 10 月 21 日
コメント済み: aldo 2023 年 10 月 22 日
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 件のコメント
Stephen23
Stephen23 2023 年 10 月 21 日
"it's possible to convert double array in array string in table ?"
Of course:
T = array2table(rand(5,2))
T = 5×2 table
Var1 Var2 ________ ________ 0.51938 0.79195 0.016597 0.088964 0.79159 0.34445 0.24275 0.62235 0.9195 0.90204
T = convertvars(T,'Var1','string')
T = 5×2 table
Var1 Var2 __________ ________ "0.51938" 0.79195 "0.016597" 0.088964 "0.79159" 0.34445 "0.24275" 0.62235 "0.9195" 0.90204
aldo
aldo 2023 年 10 月 22 日
thanks

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by