ml_check_cell_param
Performs an assert on all elements in a cell-array.
Contents
Syntax
opts = ml_check_cell_param(opts, field, assertFn, default) cellArr = ml_check_cell_param(param, name, assertFn)
Description
Checks for the field of a struct or any variable to pass assertFn and packs it into a cell array. If the given variable already is a cell array, all elements are tested and empty values are overwritten with the default.
Input
- opts - struct, having its field checked
- field - character array, name of struct's the field
- assertFn - function, behaving like ml_assert_*
- default - value that is used if the field does not exist
- param - the value to be checked
- name - character array, used in error messages
Output
- opts - structure, copy of the input with the field set and put into a cell array
- cellArr - the input value wrapped in a cell array
See Also