Unable to import multiple csv files (Having same string name but sequentially different)
조회 수: 3 (최근 30일)
이전 댓글 표시
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)
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Error Detection and Correction에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!