argsOut = VectorArgCheck(['ndims',ndims],argsIn)
This function takes in a list of arguments and makes them all the same size. If the optional input ndims is one, the outputs will all be either rows or columns based on the first vector input. If ndims is two or unspecified, it will look at the maximum size in dimension 1 (N1) and the max size in dimension 2 (N2) of all the inputs, with the exception of strings. The outputs will be of size N1xN2. Character arrays will not be repeated. If only a single output is specified the outputs will be returned as a cell array.
Parameters |
Description |
ndims [list] |
(Optional) Number of non-singleton dimensions for the output. Must specify as 'ndims',scalar,... Defaults to number of non-singleton dimensions found in the |
argsIn [list] |
Comma-separated list of arguments |
Return Values |
Description |
argsOut [list/cell] |
Comma-separated list of arguments that have the same length |
>> NumGeoms = 10;
>> G = FlyoutGeom(GeomStruct,linspace(0,100,NumGeoms));
>> [RP,re] = VectorArgCheck(vertcat(G.RP),LocalEarthRadius(G))
>> [alpha,L,z,Cn2] = VectorArgCheck([1 2 3],Atm.L,Atm.z,Atm.Cn2)
>> [Diam,DObs,r0] = VectorArgCheck('ndims',1,Diam,DObs,r0)
Copyright (c) 2009. All rights reserved.
|
What do you think about this topic? Send feedback!
|