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: Export Data from C to MATLAB
Replies: 10   Last Post: Oct 31, 2012 9:22 PM

Advanced Search

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

Posts: 113
Registered: 11/22/09
Re: Export Data from C to MATLAB
Posted: Oct 31, 2012 7:10 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

dpb <> wrote in message <k6s4vn$pll$>...
> On 10/31/2012 4:14 PM, Jeff wrote:
> > As a followup question, what is the best way to export data from a C
> > program on Linux (on a system which does not have MATLAB on it) to be
> > used in MATLAB?
> >
> > Just to add some detail: my advisor thinks I should just printf the
> > data. But there is a lot of data, might this be too much for MATLAB to
> > accept in a text file? Is there a better way?

> I'd suggest stream unformatted as much better since it will be full
> precision and assuming the data is double quite a lot smaller of a file.
> Matlab has great flexibility in fread combined w/ fopen to handle any
> common format currently in use.
> --

Hi dpb. Thanks. Could you clarify "stream unformatted" to a C and MATLAB newbie (that's me)? A line or two of code which shows what you mean is best, because then I can just read about the commands you show. Do you mean "fwrite" in C or in MATLAB?

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.