vssBlockDerivativeFlag

Flag used in custom blocks and called to apply a specific computation to the system.

Syntax

flagout = vssBlockDerivativeFlag

Outputs

flagout
Output of flag.
Type: logical
Dimension: Boolean

Example

Flag used in an OML Custom Block, using also the API vssSetDerState to set the derivative state equal to the system's velocity that was solved in the equation of motion.

function OmlBlockFunction(block,flag)
	...
    if flag==vssBlockOutputUpdateFlag
       ...
    elseif flag==vssBlockDerivativeFlag
       xd=[(Force-k_d*x(1)-k_s*x(2))/M;x(1)];
       vssSetDerState(block,xd);    
    end
end