I need help in generating 100 different polynomials of a certain degree and then finding the total number real roots. I know that I can generate a random polynomial of say degree 5 by typing
x=roots(rand([1 6]))
I also figured out the total number of real numbers by typing
size(x(imag(x)==0))
Can someone help me in writing a for loop for this?