MatVis format:
MatVis('function name', additional parameters...)

Function: 'init' and 'initMode'

Initialize the MatVis graphics subsystem and estimate the video framerate.


Parameters :

('init') use default screen resolution and estimate framerate. based on 500 video frames
('init', number) where number is duration in video frames for testing framerate
('init', number, width, height) screen width & height in pixels
('init', number, width, height, depth) depth in bits (currently limited to 8 bits)
('init', number, width, height, depth, rate) video frame rate in hertz
('initMode', mode) initialize system based on the numerical video mode
('initMode', mode, number) where number is duration in video frames for testing framerate

Return:

1 = indicates an internal error occurred and MatVis in has not been initialized
0 = successful initialization

Description:

The init function sets up the internal data structures and graphics subsystem of MatVis. It typically is the first MatVis function called since most other functions require information setup during the call to init. The framerate parameter in init is not always available (depends on video card driver) in which case just set it to 0.
It will use the default frame rate. To select a specific framerate use the initMode command.

Examples:
1) Initialize the graphics subsystem and estimate framerate using 1000 video frames at screen resolution of 800 by 600 pixels.
MatVis('init', 1000, 800, 600) ;

2) Set the MatVis video system to mode 9 (see the "showModes" function) and estimate framerate based on presenting 2000 video test frames.
MatVis('initMode',9,2000) ;

3) example program: .

See Also:
showModes getFramerate setModeDimensions