Effacer les filtres
Effacer les filtres

Unable to import multiple csv files (Having same string name but sequentially different)

3 vues (au cours des 30 derniers jours)
Hello All,
I want to extract the data of 1st and 7th column from different different the csv files. csv files have first row varaible name and rest all is numeric data. so I want to import the csv files and then extract the data from the files.
files are like
velocity_recheck_atminup05_1
velocity_recheck_atminup05_2
velocity_recheck_atminup05_3
velocity_recheck_atminup05_4
............................
and data in each table is like
Velocity:0 Velocity:1 Velocity:2 vtkValidPointMask arc_length Points:0 Points:1 Points:2
0 0 0 1 0 -0.05 0 0
1.37E-09 8.50E-12 0 1 4.00E-05 -0.05 4.00E-05 0
2.73E-09 1.70E-11 0 1 8.00E-05 -0.05 8.00E-05 0
I can succesfully do but only for 1 file but unable to do for all like in a loop.
clc
clear all
close all
M= readtable('velocity_recheck_atminup05_1.csv');
MD=table2array(M);
velx=MD(:,1);
ycord=MD(:,7);
plot(ycord,velx)

Réponses (0)

Catégories

En savoir plus sur Error Detection and Correction dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by