Dhuva Gupta wrote:
> Q1) WAP in MATLAB that will accept only positive integers and calculates Arithmatic and Geometric means.The program terminates when the user enters a -ve value.Use a while loop to get the inputs.
All of the problems you list appear to be homework assignments. What have *you* come up with
so far on them, or what -specific- Matlab questions do you have about them?
Have you go into the Matlab help (press F1) and read the "Getting Started" tutorial ??
> Q2)Consider the following Eqation:
> Using this eqation design a random number generatorwhose output is a real number in the range [0.0,1.0)
That question cannot be solved as written. It could be solved if the question was
about pseudo-random numbers, but for _random_ numbers you need a source of indeterminacy,
something that is unpredictable ahead of time and which cannot be (or is extremely difficult to
be) deliberately biased (such as by an attacker who is trying to alter a casino odds in favour
of the attacker.)