Number of output arguments you request from the function that calls argoutnum. c is an integer.
You can use
argoutnum to determine if the number of outputs you request from a function is less than the maximum number of outputs for that function. You then can bypass the calculation of the unrequested outputs. If you attempt to call
argoutnum outside of a user-defined function, MathScript always returns 0.
Copy the following script into a new MathScript inside your project. The script uses argoutnum to determine if the number of outputs you request from integerdivision is greater than 1. If you request less than two outputs from integerdivision, MathScript bypasses the calculation of the remainder output.
function [quotient, remainder] = integerdivision(dividend, divisor)
%This is an example for using arginnum and argoutnum.
divisor = 1
quotient = floor(dividend / divisor)
remainder = rem(dividend, divisor)
After you copy the script into your project, call the following commands in the MathScript node.