Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

Topic: read a csv
Replies: 7   Last Post: Dec 13, 2012 11:04 AM

Advanced Search

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

Posts: 3,892
Registered: 12/7/04
Re: read a csv
Posted: Dec 12, 2012 1:57 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Thursday, December 13, 2012 7:37:08 AM UTC+13, Eleftheria Paidousi wrote:
> i have a .csv file with mixed data and i want to process it with matlab , delete some rows or columns only under some conditions , How can i do it?! I tried textscan but i think that i can change no element .... What should i do?!?!

Read it in line by line using fgetl and process each line as you go.
while 1
line=fgetl(fid);
if line == -1,break,end % End of file
Process each line depending on some criteria you haven't told us about
end
fclose(fid);



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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.