f



Some MATLAB problems....help needed.

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.

Q2)Consider the following Eqation:
N(i+1)=mod(8121N(i)+28411,134456)
Using this eqation design a random number generatorwhose output is a real number in the range [0.0,1.0)

Q3)Write a MATLAB function to calculate the running average and standard deviation of the data set as it is being entered.

Q4) Write a MATLAB function "dice" that simulats the throw of a fair diceby returning a random integer between 1 and 6.everytime it is called.May use the program of Q2

Q5)WAP that accepts a strings from a user with the INPUT function sorts the strings into ascending order disregarding case and prints them out.
0
4/2/2009 3:22:01 PM
comp.soft-sys.matlab 211266 articles. 23 followers. lunamoonmoon (257) is leader. Post Follow

1 Replies
608 Views

Similar Articles

[PageSpeed] 50

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:
> N(i+1)=mod(8121N(i)+28411,134456)
> 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.)
0
roberson (2980)
4/2/2009 5:14:38 PM
Reply: