isOutputFixedSize
Check if outputs of a System object are fixed size
Description
[
returns whether each output of a System object™ is fixed size.flag_1, flag_2, ..., flag_n
] = isOutputFixedSize(obj
)
Examples
Call isOutputFixedSize to check if the outputs of a System object are fixed size.
Consider a System object object defined as,
classdef UnitDelay < matlab.System % UnitDelayNondirect Delay input by one time step properties(DiscreteState) State Step end methods(Access = protected) function resetImpl(obj) obj.State = 0; % Initialize states obj.Step = 1; end function [y1, y2] = stepImpl(obj,u) y1 = obj.State; % Output current state y2 = obj.Step; obj.State = u; obj.Step = obj.Step + 1; end function [sz1, sz2] = getOutputSizeImpl(obj) sz1 = [1,1]; % Specify size of output port sz2 = [1,1]; end function [flag1, flag2] = isOutputFixedSizeImpl(obj) flag1 = true; % Specify if output is fized size flag2 = true; end function [c1, c2] = getOutputDataTypeImpl(obj) c1 = 'double'; % Specify output datatype c2 = 'double'; end function [c1, c2] = isOutputComplexImpl(obj) c1 = false; % Specify if output is complex c2 = false; end end end
Create an instance of the System object and provide it with an input.
a = UnitDelay(); [out, step] = a(1);
Call isOutputFixedSize to check if the outputs of the System object are fixed size.
[flag_1, flag_2] = isOutputFixedSize(a);
Input Arguments
System object handle used to access properties, states, and methods specific to the
object. The number of outputs must match the number of outputs returned by the getNumOutputs
method.
Output Arguments
Logical, scalar value indicating whether the specific output port is fixed size.
true
is returned if output is fixed size and
false
is returned if output is variable sized.
Version History
Introduced in R2012a
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.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- 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)