|
[Sponsors] |
October 1, 2000, 02:51 |
about gnuplot or matlab
|
#1 |
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. |
|
October 2, 2000, 07:16 |
Re: about gnuplot or matlab
|
#2 |
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. |
|
October 2, 2000, 19:42 |
Re: about gnuplot or matlab
|
#3 |
Guest
Posts: n/a
|
Matlab uses the fread and fwrite command to read and write binary files.
|
|
October 3, 2000, 05:52 |
Re: about gnuplot or matlab
|
#4 |
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)); |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to start Fluent with Matlab?? | Jay Hu | FLUENT | 8 | November 9, 2022 07:30 |
Quick OpenFoam to MatLab lesson plz :) | Rickard.Solsjo | OpenFOAM | 6 | October 26, 2020 12:58 |
OpenFOAM command from inside MATLAB | sega | OpenFOAM Post-Processing | 18 | September 25, 2012 08:35 |
2-D Euler Solver for compressible flow in Matlab | Volkan | Main CFD Forum | 1 | October 28, 2007 02:40 |
Help with GNUPlot | Renato. | Main CFD Forum | 6 | June 6, 2007 20:51 |