How to save data in csv format as output data?

36 ビュー (過去 30 日間)
vimal kumar chawda
vimal kumar chawda 2022 年 6 月 29 日
コメント済み: Star Strider 2022 年 6 月 29 日
clc;
close all;
clear all;
num = xlsread("SensorsAP_example.csv");
Split the cell into format of date
timestamp = num(:,3);
date.days = floor(timestamp/(10^6));
date.hours = floor(mod(timestamp,10^6)/(10^4));
date.mins = floor(mod(timestamp,10^4)/(10^2));
date.secs = mod(timestamp,10^2);
save('data.csv','date')

回答 (2 件)

KSSV
KSSV 2022 年 6 月 29 日
Read about writetable, csvwrite
  1 件のコメント
vimal kumar chawda
vimal kumar chawda 2022 年 6 月 29 日
Sorry, I can read but I want as output. So hope you might know what is the issue with the script.
Can you please read the question again not improt but its all about output?

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


Star Strider
Star Strider 2022 年 6 月 29 日
That is not the appropriate way to do the conversion.
See my Answer to your previous post.
  2 件のコメント
vimal kumar chawda
vimal kumar chawda 2022 年 6 月 29 日
Not working as I have mention in the image.
Star Strider
Star Strider 2022 年 6 月 29 日
What does ‘not working’ mean?
It works when I run it, producing what appears to me to be an appropriate result. As I mentioned, if the conversion routine is something different that POSIX (I experimented with Excel dates and that failed), we need to know what the conversion is.
For example, if you know the correct dates and times for at least two ‘timestamp’ values (preferably not immediately adjacent to each other), and assuming linearity, it would be possible to perform a linear regression to convert them into something meaningful, for example to MATLAB datenum values that could then be converted to datetime arrays. .
As I mentioned, 37 hour days and 61 minute hours make no sense, at least in terrestrial time. (Maybe on other planets, time is different.)

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

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by