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 make EMG analysis by Matlab?

Background Protein therapeutics are a major component of the biotechnology industry, with sales estimated in the range of ~$99bn annually (2011) and steady market growth. Many phar

IIR filter using Bilinear trasformation

Various commands for get the help: There are various commands which can serve as an introduction to MATLAB and allow you to get the help: info will show contact informatio

For the 66kV subtransmission network shown below, calculate the following, using a MATLAB Simulink Power System Blockset model: 1. Three phase, phase-to-phase and phase-to-earth

Example of Variables and assignment statements: The expression is computed and then that value is stored in the variable. For illustration, this is the way it would appear in

As shown in Figure 1, Ecosystem carbon (C) cycles in a tropical forest can be modeled using three "compartments":  aboveground (AG), belowground (BG), and soil organic matters (SOM

There are many approaches to numerically estimating the derivative of the function.  The relationship:   is called a forward difference, since the estimate of the derivativ

what are the steps we need to write in the script to get themedian for X values