5.0

5.0 | 1 rating Rate this file 4 Downloads (last 30 days) File Size: 8.76 KB File ID: #26585
image thumbnail

Stop a Simulation in Steady State using STOP block

by Saurabh Mahapatra

 

03 Feb 2010

Use STOP block to stop a simulation in steady state condition

| Watch this File

File Information
Description

This example was inspired by a MATLAB Newsgroup thread here:

http://www.mathworks.co.jp/matlabcentral/newsreader/view_thread/271266

Using the STOP block and a delay block, you can compute the error difference between successive values of a variable of interest. When the error in nth decimal place falls below the threshold, you can use the Compare to Constant block to activate the STOP block.

The STOP block can be used in a powerful manner: For example, by setting the time of simulation to infinite, you can control how long the simulation runs depending on dynamics of the computation within the model.

Required Products Simulink
MATLAB release MATLAB 7.9 (2009b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
25 Aug 2010 Andreas

Really nice.

10 Oct 2010 Saurabh Mahapatra

You can now follow me on Twitter:

http://twitter.com/simulinkdude

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
stop Saurabh Mahapatra 30 Jun 2010 08:44:49
simulation Saurabh Mahapatra 30 Jun 2010 08:44:49
simulink Saurabh Mahapatra 30 Jun 2010 08:44:49
steady Saurabh Mahapatra 30 Jun 2010 08:44:49
tolerance Saurabh Mahapatra 30 Jun 2010 08:44:49
state Saurabh Mahapatra 30 Jun 2010 08:44:50

Contact us at files@mathworks.com