FUNCTION ones,n,COL=col,TYPE=type ;+ ;x=ones(n) constructs a row vector containing n ones. ;x=ones(n,/COL) generates a column vector of n ones. ; ;The default array type is INTEGER. However, the type ;can be set to any of the types accepted by MAKE_ARRAY ;by using the keyword TYPE. See Help on SIZE for a list ;of type codes. ; ;EXAMPLE ;V=ones(10,/COL,TYPE=4) constructs a column of 10 floats. ; ;H. Rhody July, 2000 ;- IF NOT KEYWORD_SET(type) THEN type=2 IF NOT KEYWORD_SET(col) THEN $ RETURN,MAKE_ARRAY(n,1,VALUE=1,TYPE=type) ELSE $ RETURN,MAKE_ARRAY(1,n,VALUE=1,TYPE=type) END