Logic Decision
Threshold crossing detector at input to binary process
Libraries:
Mixed-Signal Blockset /
Utilities
Description
Logic Decision block produces an output event at a fixed delay from almost exactly the time the input signal crosses a decision threshold. This block helps transitioning from a uniformly sampled input waveform to an event driven digital logic subsystem.
Ports
Input
wave — Input signal
fixed step sampling | variable step sampling | scalar
Input signal, specified as a floating point scalar. The input signal can either be inherited, or defined by the Logic Decision block as a fixed step discrete sample time.
Data Types: double
| Boolean
vth — Decision threshold value
scalar
Decision threshold value, specified as a scalar. The value at vth port determines when the input signal is delayed by a fixed amount.
Data Types: floating point
Output
events — Output signal
0
| 1
Output signal, returned as either 0
or
1
.
Data Types: double
| Boolean
Parameters
Sample time — Source of sample time
Inherited
(default) | Fixed
Source of sample time.
Select
Inherited
to inherit sample time from previous block.Select
Fixed
to set discrete sample time to a fixed value.
Programmatic Use
Use
get_param(gcb,'SampleTimeSource')
to view the current source of Sample time.Use
set_param(gcb,'SampleTimeSource',value)
to set Sample time to a specific value.
Sample time value — Actual value of sample time
20e-12
(default) | real scalar excluding zero
Actual value of sample time, specified as a real scalar excluding zero.
Dependencies
To enable this parameter, select Fixed
in Sample
time parameter.
Programmatic Use
Use
get_param(gcb,'SampleTimeIn')
to view the current Sample time value.Use
set_param(gcb,'SampleTimeIn',value)
to set Sample time value to a specific value.
Minimum delay value — Minimum propagation delay value
1e-15
(default) | positive scalar
The minimum propagation delay for the block, specified as a positive scalar. For a fixed discrete input sample time, the actual delay is the maximum of this parameter value and the fixed step size.
Programmatic Use
Use
get_param(gcb,'Delay')
to view the current Minimum delay value.Use
set_param(gcb,'Delay',value)
to set Minimum delay value to a specific value.
Buffer size — Number of threshold crossings to buffer
1
(default) | positive integer scalar
The number of pending output events that can be stored in the block, specified as a positive integer scalar.
Programmatic Use
Use
get_param(gcb,'BufferSizeIn')
to view the current Buffer size.Use
set_param(gcb,'BufferSizeIn',value)
to set Buffer size to a specific value.
Version History
Introduced in R2019a
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)