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: How Convert TXT data format to MAT data format
Replies: 13   Last Post: Sep 13, 2017 1:12 PM

Advanced Search

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

Posts: 9,850
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, 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]

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