MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1

"anotherFunc":
{
"inputs":
[
{"name":"input1", "kind":"required", "type":["numeric"]},
{"name":"input2", "kind":"required", "type":["numeric"]}
]
},
"anotherFunc":
{
"inputs":
[
{"name":"input1", "kind":"required", "type":["numeric"]},
{"name":"input2", "kind":"required", "type":[["char"],["string"]]},
{"name":"input3", "kind":"required", "type":["numeric"]}
]
}
}


Alternatively, you can define multiple function signatures using the
mutuallyExclusiveGroup property of the argument object. Typically, it is easier and
more readable to implement multiple function objects, but using mutually exclusive
groups enables reuse of common argument objects, such as input1.


{
"_schemaVersion": "1.0.0",
"anotherFunc":
{
"inputs":
[
{"name":"input1", "kind":"required", "type":["numeric"]},
{"mutuallyExclusiveGroup":
[
[
{"name":"input2", "kind":"required", "type":["numeric"]}
],
[
{"name":"input2", "kind":"required", "type":[["char"],["string"]]},
{"name":"input3", "kind":"required", "type":["numeric"]}
] ] } ] } }


See Also


validateFunctionSignaturesJSON


More About



  • “Check Syntax as You Type”


See Also
Free download pdf