Generate data from two non-rectangular uniform classes

Number of points in each class

n1 = 100 ; n2 = 100 ;

Specialized data generation

SpecialDataGeneration[ flag_] := Module[{x, y},  {x, y} = r2[1] ; While[-flag * x > flag * y, {x, y} = r2[1]] ; {x, y}] ;

Generate data

data1 = Table[SpecialDataGeneration[1], {n1}] ; data2 = Table[SpecialDataGeneration[-1], {n2}] ;

Visualize data

gd1 = PlotData2D[data1, pr, style1, nS] ; gd2 = PlotData2D[data2, pr, style2, nS] ; gd = Show[gd1, gd2, FS] ;

[Graphics:../HTMLFiles/index_20.gif]


Created by Mathematica  (September 8, 2003)