View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Zero Order Hold with variable time step

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

4.0
4.0 | 1 rating Rate this file 3 Downloads (last 30 days) File Size: 8.76 KB File ID: #31711 Version: 1.0
image thumbnail

Zero Order Hold with variable time step

by

Phil Goddard (view profile)

 

Level-2 M-file S-function that acts as a ZOH sampler with sample times specified as a block input.

| Watch this File

File Information
Description

This submission demonstrates how to write a level-2 M-file S-function with a variable sample time.

The block samples and holds an input signal were the inter-sample period is specified by another input signal (and may vary from time period to time period).

Each step size must be positive or an error is thrown.

Acknowledgements

Pulse With Jitter inspired this file.

Required Products Simulink
MATLAB release MATLAB 7.10 (R2010a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
21 Mar 2016 Ketan Dewan  
10 Jul 2015 Phil Goddard

Phil Goddard (view profile)

In R2014b (and later releases) function names have became strictly case sensitive. Hence, to get the model to execute you need to rename VariableTimeSfun.m to be VariableTimeSFun.m -- note that "f" needs to be changed to "F".

Comment only

Contact us