![]() |
#2
zxleslie2013-11-13 11:51
|
void randa(float *x,int num)
{
int i;
struct time stime;
unsigned seed;
gettime(&stime);
seed=stime.ti_hund*stime.ti_min*stime.ti_hour;
srand(seed);
for(i=0;i<num;i++)
{
x[i]=rand();
x[i]=x[i]/32768;
}