Illustration of minimum and maximum value, MATLAB in Mathematics

Illustration of Minimum and Maximum Value

Both of these functions also return the index of the minimum or maximum value; when there is more than one occurrence, it returns the first. For illustration, in the data set below, 10 is the maximum value; it is found in three elements in the vector but the index returned is the first element in which it is found (that is 2):

>> x = [9 10 10 9 8 7 3 10 9 8 5 10];

>> [maxval, maxind] = max(x)

maxval =

    10

maxind =

    2

Posted Date: 10/22/2012 6:54:22 AM | Location : United States







Related Discussions:- Illustration of minimum and maximum value, Assignment Help, Ask Question on Illustration of minimum and maximum value, Get Answer, Expert's Help, Illustration of minimum and maximum value Discussions

Write discussion on Illustration of minimum and maximum value
Your posts are moderated
Related Questions
Writing variables to a File: The save command is used to write variables to a file, or to append the variables to a MAT-file. By the default, save function writes to a MAT-fil

Error-Checking for Integers: As MATLAB uses the type double by default for all the values, to check to make confirm that the user has entered an integer, the program have to c

Pie chart - plot functions: The MATLAB also has a function pie which will generate a pie chart. Calling the function with the form pie (vec) draws a pie chart, by using the pe

Function fopen - file function: The permission string in the call to the fopen function identifies that the file is opened for writing to it. Just as when reading from a file,

Complex numbers: A complex number is commonly written in the form z = a + bi here a is known as the real part of the number z, b be the imaginary part of z, and i is √-1

Dimensions - matrix: The size and length functions in the MATLAB are used to find array dimensions. Length function returns the number of elements in the vector. The size func

Counting in a While Loop: Whenever it is not known ahead of the time how many values will be entered into the script, it is often essential to count the number of values which

Blanks function: The blanks function will generate a string consisting of n blank characters-that are kind of hard to see here! Though, in a MATLAB if the mouse is moved to hi

Applications of Customized Strings: Labels, Prompts, Arguments to Functions: The one of very useful application of this is to involve numbers in strings that are used to plot

Recursive Functions: The Recursion occurs whenever something is defined in terms of itself. In the programming, a recursive function is a function which calls itself. The Recu