Algorithms, MATLAB Programming


Before writing any computer program, it is very useful to first outline the steps which will be essential. An algorithm is the series of steps required to solve a problem. In modular approach to programming, the solution of the problem is broken down into separate steps, and then each step is then refined again until the resulting steps are sufficient to be manageable tasks. This is known as the top-down design approach.

As a simple illustration, consider the problem of computing the area of a circle. At First, it is essential to determine what information is required in order to solve the problem, which in this situation is the radius of the circle. Now, given the radius of the circle, the area of the circle would be computed. Last, once the area has been computed, it has to be displayed in some way. Therefore, the basic algorithm is as shown below:

  • Obtain the input: the radius
  • Compute the result: the area
  • Show the output



Posted Date: 10/18/2012 5:36:31 AM | Location : United States

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

Write discussion on Algorithms
Your posts are moderated
Related Questions
Calling a Function: Here is an illustration of the call to this function in which value returned is stored in the default variable ans: >> calcarea(4) ans = 50.2655

Create a function using mat lab to generate a sinusoidal signal. The parameters of the signal should have an Amplitude = 100, frequency = 100Hz, initial phase = 0, sample rate = 50

Illustration of Function functions: For illustration, to pass the sin function into fplot, one would pass its handle as shown in figure for the result.   >> fplot(@s

Matlab Command Reference 1. Getting Help: The help command is used to find the functions and its syntax. Similarly, lookfor is used to find the functions or topics. For examp

Introduction to Matlab: The MATLAB is a graphical and mathematical software package; it has graphical, numerical and programming capabilities. It has built-in functions to do

Illustration of switch statement: Here are the two illustrations of calling this function: >> quiz = 22; >> lg = switchletgrade(quiz) lg = X >> quiz = 9; >>

For a statistically stationary environment it would be advantageous to use gear shifting, that is to reduce the adaptation gain with time. To illustrate this, try using a varying a

Obtain the input - Algorithms: From where does the input come? The two possible choices would be from an external file on a disk, or from the user, who enters the number by ty

Write the iterative Newton root nding function from lecture to be recursive. The function declaration should be root = newtonRec(f,df,x,tol). The inputs to the function are: ?

This assignment deals with the combination of dynamic memory allocation and structures to create a common data structure known as a doubly-linked list, which is shown in Figure 1.