I have data in excel sheet with two columns and I want to create a third column in place of the first one.
3 ビュー (過去 30 日間)
古いコメントを表示
Sameer Raja
2018 年 10 月 29 日
回答済み: Kathleen T. Nevola
2018 年 10 月 30 日
Hi all, I have data in excel sheet with two quantities Force [1st column] and Angle[2nd column]. I want to create a Time stamp using for loop in first column moving force to 2nd column and angle to 3rd, without changing their values.
1 件のコメント
dpb
2018 年 10 月 30 日
HINT: No for loop needed to do this; use colon operator or linspace. datetime may be of interest.
採用された回答
Kathleen T. Nevola
2018 年 10 月 30 日
You could use the for loop to make a vector of time stamp values and then concatenate the timestamp vector with the force and angle matrix to get a new matrix to export to excel.
mat = [Force Angle]
new_mat = [Time_stamp mat]
Assuming the vectors have the same length.
For more on writing data to excel check out this link: https://www.mathworks.com/help/matlab/import_export/exporting-to-excel-spreadsheets.html
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Import from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!