SCALARDISTRIBUTE Copy scalar to array shape for parameter handling Usage: [...] = scalardistribute(...); `[...]=scalardistribute(...)` copies the input parameters to the output parameters. * If one of the input parameters is an array, all the output parameters will be column vectors containing the same number of elements. If one of the other input parameters is a scalar, it will be replicated to the correct length. This allows a scalar value to be repeated for all conditions. * If two or more input parameters are arrays, the must have the exact same size. They will be converted to vectors and returned in the output parameters. This allows two arrays to co-vary at the same time. This operator is usefull for sanitizing input parameters: The user is allowed to enter scalars or arrays as input paremeters. These input are in turn passed to `scalardistribute`, which makes sure that the arrays have the same shape, and that scalars are replicated. The user of `scalardistibute` can now generate conditions based on all the parameters, and be sure the have the right sizes. As an example, consider::: [a,b,c]=scalardistribute(1,[2,3],[4,5])
Package: ltfat