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
An environmental consulting firm is conducting a site investigation on an abandoned industrial site that is 200 m by 150 m in size (Fig. 1). A number of piezometers were installed

I have an assignment to do by MATLAB : the assignment is to design Script that makes (Panorama Stitching) for multiple pictures .. for more information see the link : tobw.net/inde

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

hey ! why the command sawtooth and square does not exist in Matlab R2012a?

why after i crop part of a tiff image the cropped image is of different pixel resolution

RECOGNIZER and TRANSLATOR: i want to recognized devanagari word using matlab. I have done it using template matching. but i am not get devanagari word at the output. But get speci

Need help programming in Matlab for airy equations

Example: Load from File and Plot Data: As illustration, a file known as timetemp.dat stores two lines of data. The first line is the time of the day, and the next line is the

Variable names: Variable names are an example of the identifier names. The rules for identifier names are as shown below: (A)The name should begin with a letter of the alph

Introduction to File Input/output (LOAD and SAVE): In most cases, the input to a script will come from a data file which has been generated by the other source. It is also use