So in one of the mask in the model i came across an initialization command that i don't understand.
The logic is for an SR Flip Flop. That latches the output. It has 1 parameter that takes in the initial state for output 1(Output is o and o(bar)). Which has the following properties:
Name: MaskParam1
Value: 0
Type: Edit
Evaluate: True
Tunable: True
The command is written in the Initialization tab of the Mask Editor.
ini = (@1~=0);
The first thing that came to my mind was anonymous function handle, that returns value of the parameter. In this case would be 0. So as
(0 ~=0) = 0hence the initial output of SR will be 0.
When i type the following in matlab:
ini = (@1~=0);
I get an error of unexpected matlab expression.
So I tried another thing. Considering as the Parameter is refering to the masked parameter so if we take a variable:
x = 0;
% The default value for the mask parameter
ini = (@x~=0);
This will give an error that
Error: "x" was previously used as a variable, conflicting with its use here as the name of a function or command.
So my question is ini
ini = (@1~=0)
a function or a variable??enter code here