CFD Online Logo CFD Online URL
Home > Forums > Main CFD Forum

about gnuplot or matlab

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   October 1, 2000, 01:51
Default about gnuplot or matlab
Junseok Kim
Posts: n/a
How can I use gnuplo or matlab to plot a binary format data file?

Any help would be great except saying look at gunplot manual, I already did that.

  Reply With Quote

Old   October 2, 2000, 06:16
Default Re: about gnuplot or matlab
Sebastien Perron
Posts: n/a
I dont't think gnuplot can handle binary files. (I've just checked in te manual)

You will need to write a simple driver that read the binary format and translate it into ascii. (This is very easy in C or C++).

As for MATLAB, I've never used it and I can't help you.
  Reply With Quote

Old   October 2, 2000, 18:42
Default Re: about gnuplot or matlab
clifford bradford
Posts: n/a
Matlab uses the fread and fwrite command to read and write binary files.
  Reply With Quote

Old   October 3, 2000, 04:52
Default Re: about gnuplot or matlab
Steve Amphlett
Posts: n/a
I can't comment on gnuplot, but if you can program in C, you can easily get binary data into MATLAB for plotting.

MATLAB provides fopen, fread, fwrite and other C-like I/O library functions - these are OK for small(ish) amounts of data. If you want to do serious binary data import, you can write what MATLAB calls a MEX file. This is your own C code, wrapped by a MATLAB gateway function that allows you to read the data yourself, manipulate it and import it directly as a MATLAB variable. Once you've written your MEX file, using it is really easy. E.g.

>> x=read_my_data('filename');
:> plot(x(:,1),x(:,2));

  Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to start Fluent with Matlab?? Jay Hu FLUENT 5 October 9, 2013 14:20
OpenFOAM command from inside MATLAB sega OpenFOAM Post-Processing 18 September 25, 2012 07:35
Quick OpenFoam to MatLab lesson plz :) Rickard.Solsjo OpenFOAM 5 October 24, 2011 06:00
2-D Euler Solver for compressible flow in Matlab Volkan Main CFD Forum 1 October 28, 2007 01:40
Help with GNUPlot Renato. Main CFD Forum 6 June 6, 2007 19:51

All times are GMT -4. The time now is 16:55.