How do I pass a dynamic number of output variables to a function?
Some functions change their behavior dependending on the number of output variables. For example, ndgrid will create N N-Dimensional arrays where N is the number of output variables. I need to pass a number of output variables that depends on other variable (whose value is not previously known). Is it possible to do that? What is the best way to do that?Some functions change their behavior dependending on the number of output variables. For example, ndgrid will create N N-Dimensional arrays where N is the number of output variables. I need to pass a number of output variables that depends on other variable (whose value is not previously known). Is it possible to do that? What is the best way to do that? Some functions change their behavior dependending on the number of output variables. For example, ndgrid will create N N-Dimensional arrays where N is the number of output variables. I need to pass a number of output variables that depends on other variable (whose value is not previously known). Is it possible to do that? What is the best way to do that? output, function MATLAB Answers — New Questions