#include <dataMatlab.hh>
Public Member Functions | |
DataMatlab (concepts::Space< Real > &spc, const std::string filename, uint dim=2, Real scl=1.0) | |
void | operator() (const concepts::Vector< Real > &sol) |
Draws a picture of data in Matlab format and stores the result in files.
The data is stored in four files by appending '1.m', '_2.m', '_3.m' and '_msh.m'. The data can be read into Matlab by giving the three four file names as commands (and ommiting the ending '*.m'). The data is plotted by
trimesh(msh, x, y, z0)
or
trimesh(msh, x, y, z0, ones(size(x,1),1))
or in 3D
Msh = msh(:,[1:3 1])'; fill3(x(Msh),y(Msh),z(Msh),z0(Msh))
This class opens and closes the four files and hands the streams to DataMatlabCell.
Definition at line 129 of file dataMatlab.hh.
graphics::DataMatlab::DataMatlab | ( | concepts::Space< Real > & | spc, |
const std::string | filename, | ||
uint | dim = 2 , |
||
Real | scl = 1.0 |
||
) |
Constructor
spc | Space on which the data should be plotted |
filename | Name base for the files to be written |
dim | Spatial dimension of the data (only dim=2 supported) |
scl | Data scaling factor |
|
inline |
Definition at line 139 of file dataMatlab.hh.
void graphics::DataMatlab::operator() | ( | const concepts::Vector< Real > & | sol | ) |
Application operator.
sol | The solution which should be plotted |