CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

about gnuplot or matlab

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 1, 2000, 01:51
Default about gnuplot or matlab
  #1
Junseok Kim
Guest
 
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
  #2
Sebastien Perron
Guest
 
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
  #3
clifford bradford
Guest
 
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
  #4
Steve Amphlett
Guest
 
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

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to start Fluent with Matlab?? Jay Hu FLUENT 8 November 9, 2022 06:30
Quick OpenFoam to MatLab lesson plz :) Rickard.Solsjo OpenFOAM 6 October 26, 2020 11:58
OpenFOAM command from inside MATLAB sega OpenFOAM Post-Processing 18 September 25, 2012 07:35
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 19:19.