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: How Convert TXT data format to MAT data format
Replies: 10   Last Post: Oct 25, 2014 1:55 PM

Advanced Search

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

Posts: 9,242
Registered: 6/7/07
Re: How Convert TXT data format to MAT data format
Posted: Dec 26, 2012 5:53 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 12/26/2012 4:20 PM, gorkemsvs@gmail.com wrote:

> C = textscan(fid, '%s%s%f32%d8%u%f%f%s%f');

> the code ,that you gave me which was wroten [written] ...
> ... I have a lot of matrixes which have different numbers of
> columns and lines in my textscan. So I need a code which can sense all
> different types of matrixes automatic.


No can do if it's arbitrary unless you have additional
information--either a header record in the file that identifies the file
structure that can then be used or read a line and identify fields on a
field-by-field basis before reading the rest of the file.

There's no magic elixir, sorry...


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

[Privacy Policy] [Terms of Use]

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