ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

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
(9,419 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
(9,315 Views)