Make this .mat variable DOUBLE- Help needed
8 ビュー (過去 30 日間)
古いコメントを表示
hello all
I want to make this attached .mat file to double, in order to use in griddedInterpolant function alongside some other doubled variables. I really search for it but can't find the answer. it doesn't matter to DateTime format keep, I just want the text that shows which row is what date. I've attached t.mat.
Thanks for your attention. I’m looking forward to your reply.
0 件のコメント
採用された回答
Bhaskar R
2019 年 10 月 30 日
編集済み: Bhaskar R
2019 年 10 月 30 日
Hi,
load t;
date_data = datetime(cell2mat(t)); % to get the all data as datetime format
date_data_double = datevec(date_data); % convert the datetime data to double data in 6 columns
Hope helps you !
2 件のコメント
Bhaskar R
2019 年 10 月 30 日
編集済み: Bhaskar R
2019 年 10 月 30 日
Anyway you can get the double datatype serial value from the datetime data.
date_data_double = datenum(date_data); % as serial double data
Now your data is in 408*1 dimension
You can convert back this data to datetime data as
datetime_back = datetime(date_data_double, 'ConvertFrom','datenum');
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Type Conversion についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!