Hi I was hoping someone can help me with my code, I'm new to matlab
data=csvread('TP4765.csv')% Import data
N=size(data,1);% determine number of increment
m=0.001;
%%%%%%%%%%%%%%%%%
the csv is 2052766x7 matrix
I would like like to replace the first colum with a vector starting from 0 in increment "m" for N times(increase 0.001 increment 2052766 times)
Thanks
Thuan

 採用された回答

madhan ravi
madhan ravi 2020 年 7 月 15 日
編集済み: madhan ravi 2020 年 7 月 15 日

0 投票

m = 0.001;
N = 2052766;
data(:,1) = 0 : m : N*m - m;
dlmwrite('TP4765.csv',data)

1 件のコメント

Thuan
Thuan 2020 年 7 月 16 日
Thanks

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLoops and Conditional Statements についてさらに検索

製品

リリース

R2020a

タグ

質問済み:

2020 年 7 月 15 日

コメント済み:

2020 年 7 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by