samedi 3 décembre 2016

matlab, produce random points between negative infinity and positive infinity

I want to produce 50 random number between negative infinity and positive infinity in matlab.

I find the low and high number in matlab with realmax and realmin but I want to know if I can use any other better way for this problem?

my function is => f(t)=cos(2t) and I want to produce 50 random point for this function.

here is what I was trying

t=random('uniform',-realmax,realmax,[50,1]);
func=cos(t*2);




Aucun commentaire:

Enregistrer un commentaire