From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

MATRIXx

cancel
Showing results for 
Search instead for 
Did you mean: 

Purpose/Output of bound()

Dear all,

 

I've been translating some MatrixX simulations into Matlab and was struggling with the MatrixX function "bound()". Before I start with another strategy, like re-interpreting the blocks, I would really like to understand what this function is for... Anyone out there who n´knows?

 

In the original context, the function is used like:

 

a=bound(x,0.1,10000.);

 

Thanks in advance!

Santiago

0 Kudos
Message 1 of 2
(8,293 Views)

bound() places limits on the value of the first input, so in your example

 

a=bound(x,0.1,10000.);

 

in pseudocode;

 

if( x < 0.1)

  a = 0.1

else if(x > 10000)

  a = 10000

else

 a = x

end

0 Kudos
Message 2 of 2
(8,189 Views)