Effacer les filtres
Effacer les filtres

Rewrite CSV First Column

1 vue (au cours des 30 derniers jours)
Thuan
Thuan le 15 Juil 2020
Commenté : Thuan le 16 Juil 2020
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

Réponse acceptée

madhan ravi
madhan ravi le 15 Juil 2020
Modifié(e) : madhan ravi le 15 Juil 2020
m = 0.001;
N = 2052766;
data(:,1) = 0 : m : N*m - m;
dlmwrite('TP4765.csv',data)
  1 commentaire
Thuan
Thuan le 16 Juil 2020
Thanks

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by