The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: importing data in file with a numerical prefix in a for loop
Replies: 2   Last Post: Dec 12, 2012 1:24 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 2
Registered: 12/10/12
importing data in file with a numerical prefix in a for loop
Posted: Dec 10, 2012 12:34 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


I am very new to MATLAB, so I am fairly certain that this is a very simple question. I have several output data sets, each with a prefix (e.g. WQ_50 to WQ_83). I would like to use a for loop to import data from the first column (having temperature data) of each of the output data set to a new matrix.

files = 50:1:83
for i = 1:length(files);
dataN = importdata ('WQ_(files(i)).csv');
tempN (i,:) = (:,1);

but i keep getting a message saying error in importdata

Any help would be great

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.