uniq

From DavinciWiki
(Difference between revisions)
Jump to: navigation, search
 
m (Removed 1.69 version)
 
(2 intermediate revisions by one user not shown)
Line 20: Line 20:
 
  dv> c=cat(a,b,axis=x)
 
  dv> c=cat(a,b,axis=x)
 
  20x1x1 array of int, bsq format [80 bytes]
 
  20x1x1 array of int, bsq format [80 bytes]
  1      2      3      4      5      6      7      8      9      10      5      6    7    8      9      10      11      12      13      14
+
  1      2      3      4      5      6      7      8      9      10       
 +
5      6    7    8      9      10      11      12      13      14
 
   
 
   
 
  dv> d=uniq(c)
 
  dv> d=uniq(c)
 
  14x1x1 array of int, bsq format [56 bytes]
 
  14x1x1 array of int, bsq format [56 bytes]
 
  1      2      3      4      5      6      7      8      9      10      11      12    13      14
 
  1      2      3      4      5      6      7      8      9      10      11      12    13      14
 +
|
 
|
 
|
 
*[[sort]]
 
*[[sort]]
Line 36: Line 38:
 
*[[sort]]
 
*[[sort]]
 
|
 
|
[[Media:uniq.dvrc|uniq()]]
+
*misc.dvrc
 
|
 
|
 
}}
 
}}

Latest revision as of 16:05, 17 January 2008


Description

Get the uniq values associated from a one dimensional input array.

Arguments and Return Values

Arguments: One dimensional numerical array

Return Value: Numerically sorted unique values from the one dimensional array

Usage

Syntax: uniq(input)

input - a one dimensional numerical array with the data on any axis.

Examples

dv> a=create(10,1,1,start=1)
10x1x1 array of int, bsq format [40 bytes]
1       2       3       4       5       6       7       8       9       10
 
dv> b=create(10,1,1,start=5)
10x1x1 array of int, bsq format [40 bytes]
5       6       7       8       9       10      11      12      13      14

dv> c=cat(a,b,axis=x)
20x1x1 array of int, bsq format [80 bytes]
1       2       3       4       5       6       7       8       9       10      
5       6    7     8       9       10      11      12      13      14

dv> d=uniq(c)
14x1x1 array of int, bsq format [56 bytes]
1       2       3       4       5       6       7       8       9       10      11      12    13      14

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Related Functions

Recent Library Changes

Created On: 04-05-2007
Modified On: 01-17-2008

Personal tools