Codeconsistency

printFunctionIO(functionName, derivedInputNames, printLevel)[source]

Lists the input and output variables (including struct fields) referenced inside a target function’s source code, e.g., when a function takes a structure as an input.

It does not list outputs of nested functions; for that, see displayRequiredFunctions(fullFileName).

USAGE:

[inputs, outputs] = printFunctionIO (functionName, derivedInputNames, printLevel)

OPTIONAL INPUTS:
  • functionName – Name of the function to print io for (default: solveCobraLP.m)

  • derivedInputNames – Name of a variable derived from an input variable, or a cell array of such variable names (default: {})

  • printLevel – If > 0 then print to terminal (default: 1)

OUTPUTS:
  • inputs – Cell array of input variable/field names found in the target function’s source code

  • outputs – Cell array of output variable/field names found in the target function’s source code

Example

[inputs, outputs] = printFunctionIO(‘solveCobraLP’, {}, 1);