Filename

Description

barplot.c

Access simulink signals without using the standard block inputs.

csfunc.c

Example C MEX Sfunction for defining a continuous system.

dlimint.c

Implement a discretetime limited integrator.

dsfunc.c

Example C MEX Sfunction for defining a discrete system.

fcncallgen.c

Execute functioncall subsystems n times at the designated rate (sample time).

limintc.c

Implement a limited integrator.

mixedm.c

Implement a hybrid dynamic system consisting of a continuous integrator (1/s) in series with a unit delay (1/z).

mixedmex.c

Implement a hybrid dynamic system with a single output and two inputs.

quantize.c

Example MEXfile for a vectorized quantizer block. Quantizes the input into steps as specified by the quantization interval parameter, q .

resetint.c

A reset integrator.

sdotproduct

Compute dot product (multiplyaccumulate) of two real or complex vectors.

sftable2.c

Twodimensional table lookup in Sfunction form.

sfun_atol.c

Set different absolute tolerances for each continuous state.

sfun_bitop.c

Perform the bitwise operations AND , OR , XOR , left shift, right shift, and one's complement on uint8 , uint16 , and uint32 inputs.

sfun_cplx.c

Complex signal add with one input port and one parameter.

sfun_directlook.c

Direct 1D lookup.

sfun_dtype_io.c

Example of the use of Simulink data types for inputs and outputs.

sfun_dtype_param.c

Example of the use of Simulink data types for parameters.

sfun_dynsize.c

Simple example of how to size outputs of an Sfunction dynamically.

sfun_errhdl.c

Simple example of how to check parameters using the mdlCheckParams Sfunction routine.

sfun_fcncall.c

Example of an Sfunction that is configured to execute functioncall subsystems on the first and third output elements.

sfun_frmad.c

Framebased A/D converter.

sfun_frmda.c

Framebased D/A converter.

sfun_frmdft.c

Multichannel framebased DiscreteFourier transformation (and its inverse).

sfun_frmunbuff.c

Framebased unbuffer block.

sfun_multiport.c

Sfunction that has multiple input and output ports.

sfun_manswitch.c

Manual switch.

sfun_matadd.c

Matrix add with one input port, one output port, and one parameter.

sfun_multirate.c

Demonstrate how to specify portbased sample times.

sfun_psbbreaker.c

Implement the logic for the breaker block in the Power System Blockset.

sfun_psbcontc.c

Continuous implementation of statespace system.

sfun_psbdiscc.c

Discrete implementation of statespace system.

sfun_runtime1.c

Runtime parameter example.

sfun_runtime2.c

Runtime parameter example.

sfun_zc.c

Demonstrate use of nonsampled zero crossings to implement abs(u) . This Sfunction is designed to be used with a variablestep solver.

sfun_zc_sat.c

Saturation example that uses zero crossings.

sfunmem.c

A oneintegrationstep delay and hold memory function.

simomex.c

Implements a singleoutput, twoinput statespace dynamic system described by these statespace equations
where x is the state vector, u is vector of inputs, and y is the vector of outputs.

smatrxcat.c

Matrix concatenation.

sreshape.c

Reshape the input signal.

stspace.c

Implement a set of statespace equations. You can turn this into a new block by using the SFunction block and mask facility. This example MEXfile performs the same function as the builtin StateSpace block. This is an example of a MEXfile where the number of inputs, outputs, and states is dependent on the parameters passed in from the workspace. Use this as a template for other MEXfile systems.

stvctf.c

Implement a continuoustime transfer function whose transfer function polynomials are passed in via the input vector. This is useful for continuous time adaptive control applications.

stvdct.f

Implement a discretetime transfer function whose transfer function polynomials are passed in via the input vector. This is useful for discretetime adaptive control applications.

stvmgain.c

Timevarying matrix gain.

table3.c

3D lookup table.

timestwo.c

Basic C MEX Sfunction that doubles its input.

vdlmint.c

Implement a discretetime vectorized limited integrator.

vdpmex.c

Implement the Van der Pol equation.

vlimint.c

Implement a vectorized limited integrator.

vsfunc.c

Illustrate how to create a variable sample time block in Simulink. This block implements a variablestep delay in which the first input is delayed by an amount of time determined by the second input.
