Programming concept, MATLAB Programming

The Programming Concept:

In most of the programming languages, random function returns a real number; therefore the real number would then have to be rounded to produce a random integer. For illustration,

>> round(rand*10)

would produce one random integer in the range from 0 to 10 (rand*10 would generate a random real in the range from 0 to 10; from which rounding will return an integer). Or, to produce a random integer in a range:

>> low = 2;

>> high = 6;

>> round(rand*(high-low)+low)

This would produce a random integer in the range from 2 to 6.

 

Posted Date: 10/18/2012 4:05:30 AM | Location : United States







Related Discussions:- Programming concept, Assignment Help, Ask Question on Programming concept, Get Answer, Expert's Help, Programming concept Discussions

Write discussion on Programming concept
Your posts are moderated
Related Questions
function y=tps(r) % This is the thin-plate spline if r  y=0; else  y=r^2*log(r); end function y=fun(point) % my target function x=point(1); z=point(2); y=7-4*x^2+z^3;

1. Write a function to threshold your images separating the background from the foreground: Implement the "peakiness" detection algorithm described in class. The output of your

Implement a MatLab function to calculate y.  The function should take two input arguments 1) A vector of parameters In the above example this would be of length 3, the first

Built-In Functions and help: There are lots of built-in functions in a MATLAB. The help command is used to find out what functions MATLAB has, and how to use them. For illustr

what are data collect this topic,how i can create algorithm in mat lab what language support easy to this topic

I need my data mining assignment done. Can you guys help me with that?

what equation equals 36

Write a program in Mathlab for addition of two matrices.

Q.1: Consider the transmission of a sinusoid x(t) = cos(2f0t) through a channel a ected by multipath and Doppler. Let there be two paths, and assume the sinusoid is being sent fro