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)

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Loops 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