Random seed generate a unique value for random functions,like randompoly{},but am only able to do this manually.Do you have idea of how i can make this automatic?
I would appreciate so much to know about this.
Am using TeXnicCenter and Mavscript016
Math & Science ⇒ Random seed
NEW: TikZ book now 40% off at Amazon.com for a short time.
Random seed
Thanks a lot
Since the packages are not familiar do you have an idea of how I can change my randomseed{} value by using using the lcg package.
Its seems better from the documentation. There ain't any documentation for the random package at CTAN.
Since the packages are not familiar do you have an idea of how I can change my randomseed{} value by using using the lcg package.
Its seems better from the documentation. There ain't any documentation for the random package at CTAN.
Random seed
I've never used it, but playing around with it, you can for example generate four random numbers between 1 and 10 like this:
I can't really help you with what you're doing, without knowing more about what you're trying to do.
(Also, a bit annoyingly, it uses the time/date the file was saved to generate its seed, so you need to resave the file if you want new values the next time you run it.)
Code: Select all
\documentclass{article}
\usepackage[english]{babel}
\usepackage{blindtext,lipsum}
\usepackage[first=1,last=10]{lcg}
\begin{document}
The first value is \rand\arabic{rand}.
The second value is \rand\arabic{rand}.
The third value is \rand\arabic{rand}.
The fourth value is \rand\arabic{rand}.
\end{document}
(Also, a bit annoyingly, it uses the time/date the file was saved to generate its seed, so you need to resave the file if you want new values the next time you run it.)
Random seed
Am using mavscript which uses Yacas for compilation. The latex files contain the codes for the equations that are compiled to equations that have real values.I have tried to run it(above example)in Yacas but it is not generating any values until after .tex to pdf compilation.Here is an example of my case
If the RandomSeed() value changes by any value the RandomPoly() generates a different equation.
The issue now is to change the randomseed automatically which am only able to change manually but I need automatic.Lets say each user is supposed to get a different equation, then its not easy to keep on changing the randomseed manually all the time.
Thanks for your continued support,I believe we are getting somewhere.
Code: Select all
$m RandomSeed(76544321)$o
$m f1:=RandomPoly(x,4,-1,4) $o
The issue now is to change the randomseed automatically which am only able to change manually but I need automatic.Lets say each user is supposed to get a different equation, then its not easy to keep on changing the randomseed manually all the time.
Thanks for your continued support,I believe we are getting somewhere.
Random seed
I don't know anything about mavscript or Yacas; in fact, I've never heard of them before, and your code means nothing to me. I still don't understand exactly what you're trying to do. (Bear with me; my degrees are all in philosophy!)
However, if you want real/decimal values, I'd suggest looking in to the rangen package, which is built on lcg, and has documentation for generating "real" numbers, and the documentation gives examples of using it to create random exam questions, etc.
I've never used any of these packages, so unless someone else can help you, I think reading the documentation for yourself will be more productive than anything I could offer.
However, if you want real/decimal values, I'd suggest looking in to the rangen package, which is built on lcg, and has documentation for generating "real" numbers, and the documentation gives examples of using it to create random exam questions, etc.
I've never used any of these packages, so unless someone else can help you, I think reading the documentation for yourself will be more productive than anything I could offer.