declaring inputs in a function ?

hi, does the matlab function accept varying number of input arguments in the function declaration? if, so how to declare the function ?
for example:
function[output]= example1(in1,in2,in3,in4)
this same function example1 should work for
function[output]=example1(in1,in2)
thank you.

 采纳的回答

Fangjun Jiang
Fangjun Jiang 2011-11-17

1 个投票

help varargin, there is an example in the help document.

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Foundation and Custom Domains 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by