Functions | Variables

sfdrawbitmap.m File Reference

Functions

function sfdrawbitmap (block)%MSFUNTMPL A template for an M-file S-function%The M-file S-function is written as a MATLAB function with the%same name as the S-function.Replace 'msfuntmpl'with the name%of your S-function.%%It should be noted that the M-file S-function is very similar%to Level-2 C-Mex S-functions.You should be able to get more%information for each of the block methods by referring to the%documentation for C-Mex S-functions.%%Copyright 2003-2006 The MathWorks
function Inc etc Do not add
any other calls to the main
body of the function 
setup (block)
block SetSimViewingDevice (1)
block SetAccelRunOnTLC (false)
block RegBlockMethod ('PostPropagationSetup',@DoPostPropSetup)
block RegBlockMethod ('ProcessParameters',@ProcessPrms)
block RegBlockMethod ('Start',@Start)
block RegBlockMethod ('Update',@Update)
Data ()
if ~strcmp (class(a), 'double')%error('Invalid parameter')
end endfunction function DoPostPropSetup (block) block.NumDworks
block Dwork (1).Name = 5
block Dwork (2).Name = 1
endfunction function Start (block) hFig
 set (hFig, 'Name', 'MCL probability')
 set (hFig, 'DoubleBuffer', 'on', 'Tag', 'mclProbab')
 set (fig, 'Renderer', 'painters')
 set (fig, 'Color', 'black')
 hold ('on')
endfunction function Update (block)%Do not draw bitmap too often last_draw
 if (block.CurrentTime< last_draw+1/20) = 360 - angle1
 set (0,'CurrentFigure', 3)%Make the figure current bitmap
 image (bitmap)
 colormap (gray)

Variables

function Inc $Revision
function Inc parameters
endfunction Function
block NumOutputPorts = 0
Setup port properties to be
inherited or dynamic block 
SetPreCompInpPortInfoToDynamic
block AllowSignalsWithMoreThan2D = true
 fig_axes = get(hFig, 'CurrentAxes')
 return

Function Documentation

colormap ( gray   ) 
1 Data (  )  [virtual]
end endfunction function DoPostPropSetup ( block   ) 
end block Dwork (  )  = 5
end end block Dwork (  )  = 1
hold ( 'on  ) 

Here is the caller graph for this function:

if (  )  = 360 - angle1

Here is the caller graph for this function:

image ( bitmap   ) 
block RegBlockMethod ( 'Update'  ,
Update 
)
block RegBlockMethod ( 'PostPropagationSetup'  ,
DoPostPropSetup 
)
block RegBlockMethod ( 'ProcessParameters'  ,
ProcessPrms 
)
block RegBlockMethod ( 'Start'  ,
Start 
)
set ( hFig  ,
'DoubleBuffer'  ,
'on ,
'Tag'  ,
'mclProbab'   
)
set ( fig  ,
'Renderer'  ,
'painters'   
)
set ( ,
'CurrentFigure'  ,
 
)
set ( fig  ,
'Color ,
'black'   
)
set ( hFig  ,
'Name'  ,
'MCL probability'   
)
block SetAccelRunOnTLC ( false   ) 
block SetSimViewingDevice (  ) 
function Inc etc Do not add any other calls to the main body of the function setup ( block   ) 
function sfdrawbitmap ( block   ) 
endfunction function Start ( block   ) 
endfunction function Update ( block   ) 
if ~strcmp ( class(a ,
'double'   
)

Variable Documentation

function Inc $Revision
fig_axes = get(hFig, 'CurrentAxes')
endfunction Function
block NumOutputPorts = 0
function Inc parameters
Setup port properties to be inherited or dynamic block SetPreCompInpPortInfoToDynamic