Group Abstract Group Abstract

Message Boards Message Boards

[?] Import a bunch of .csv files automatically?

Posted 8 years ago

Hey guys, I'm currently evualting the experimental results from a digital oscilloscope. This is the code I'm using:

SetDirectory[NotebookDirectory[]];
raw = Import["src/T0005.csv"];
plotData=Select[raw[[17;;]],Length[#]==5&];
time=plotData[[All,1]];
ch1 = plotData[[All,2]];
dataset1=Thread[{time,ch1}];
ListPlot[dataset1,PlotRange->All,AxesLabel->{HoldForm[Zeit in s],HoldForm[Spannung in V]},PlotLabel->HoldForm[Schwingung einer gezupften Saite],LabelStyle->{FontFamily->"Calibri",12,GrayLevel[0]}]

Now the Problem is that I have a lot of csv files and basically all I have to do is to make a plot of all the datasets. So currently I have about 20 files, which all contain the same code, apart from importing another .csv file (T0001.csv, T0002.csv,...). So I thought that there has to be a more elegant way to do the same Operation for a bunch of datasets. Maybe a For-Loop with the couting Parameter in the filename (T000i.csv).

How would you guys solve this Problem?

Attachments:
POSTED BY: Epsilon Tau
POSTED BY: Neil Singer
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard