Ahmad Kamal on Thu, 05 Jul 2012 13:47:33 +0200

 Re: Hello

thanks alot i have tried it and it worked well,  but i want to ask another 2 questions please:

1- what if i want to guarantee that the polynomial to be of degree m not less than that.?

2- how can i get n polynomials ( f1(x), f2(x) , ...,fn(x)......etc)?

On 5 July 2012 13:33, Bill Allombert wrote:
On Thu, Jul 05, 2012 at 02:12:48PM +0300, Ahmad Kamal wrote:
>  what i mean is i want to create multiple functions like that:
>
> f1(x)=(25*x^m)+ (315*x^(m-1))+.....etc
> f2(x)=(33*x^m)+ (14*x^(m-1))+.....etc
> .
> .
> .
> fn(x)=(16*x^m)+ (19*x^(m-1))+.....etc
>
> and the coefficients (25,33,16,315,14,19) to be random.

So you actually want to create random polynomials of degree m ?
Just do
random(B*x^m) where m is the degree and B the bound on the coefficients, e.g.

? random(1000*x^10)
%1 = 546*x^10+713*x^9+887*x^8+998*x^7+729*x^6+768*x^5+595*x^4+368*x^3+832*x^2+419*x+737
? random(1000*x^10)
%2 = 158*x^10+31*x^9+224*x^8+293*x^7+478*x^6+225*x^5+53*x^4+120*x^3+374*x^2+588*x+555

Cheers,
Bill.

• Follow-Ups:
• Re: Hello
• From: Karim Belabas <Karim.Belabas@math.u-bordeaux1.fr>
• References:
• Hello