Efficient method, MATLAB Programming

The Efficient Method:

Though, in MATLAB, there is another built-in function which specifically produces random integers, i.e. randint. Calling the function with randint (1,1,n) produces one random integer in the range from 0 to N - 1. The first two arguments basically specify that one random integer will be returned; the third argument gives the range of that random integer. For illustration,

>> randint(1,1,4)

produces a random integer in the range from 0 to 3. Note: Even though it creates random integers, the type is really the default type double.

The range can also be passed to randint function. For illustration, the below indicates a random integer in the range from 1 to 20:

>> randint(1,1,[1,20])

 

Posted Date: 10/18/2012 4:06:02 AM | Location : United States







Related Discussions:- Efficient method, Assignment Help, Ask Question on Efficient method, Get Answer, Expert's Help, Efficient method Discussions

Write discussion on Efficient method
Your posts are moderated
Related Questions
How to calculate 2D/3D structure tensor of image

Savannah says that the least common multiple of 4 and 6 is 24. Is she right or what is her mistake?

Plot way forms for the following modulation schemes using Matlab: a)      2 ASK                     b)  BFSK                                  c) BPSK          4 ASK


A filter described by the equation:    y(n) = x(n) + x(n-1) + 0.9 y(n-1) - 0.81 y(n-2) (a) Find the transfer function H(z) for the filter and find the poles and zeros of the fil

Error in variables statements: Error: The expression in the left of equals sign is not a valid target for an assignment. >>  By placing a semicolon at the end of the sta

Problem 1.  Use Matlab to solve the following system of linear equations: 2x + y + 3z = 1 2x + 6y + 8z = 3 6x + 8y + 18z = 5 Capture Matlab code and the result in a text fi

This assignment is designed to compare performance between Matlab and Excel for performing nonlinear regression analysis of a set of data. There are two data sets in the accompa

i made graph using adjacent matrix i have to find the critical path on that graph in matlab work can you please give me that code.

The Switch Statement: A switch statement can frequently used in place of a nested if-else or an if statement with numerous else if clauses. The Switch statements are used when