MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
zip(list1, list2, f) combines two lists via
f. It returns a list whose i-th
f(list1[i], list2[i]). Its length is the
minimum of the lengths of the two input lists.
zip(list1, list2, f, default) returns a list
whose length is the maximum of the lengths of the two input lists.
The shorter list is padded with the
f produces the void object of type
then this element is removed from the resulting list.
zip is recommended for fast manipulation
of lists. It is a function of the system kernel.
The fastest way of adding the entries of two lists is to 'zip'
them via the function
zip([a, b, c, d], [1, 2, 3, 4], _plus)
If the input lists have different lengths, then the shorter list determines the length of the returned list:
zip([a, b, c, d], [1, 2], _plus)
The longer list determines the length of the returned list if a value for padding the shorter list is provided:
zip([a, b, c, d], [1, 2], _plus, 17)
lists of arbitrary MuPAD® objects
Any MuPAD object. Typically, a function of two arguments.
Any MuPAD object