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
How do I write a product series running from i to n of x''s using a for loop?

how can reconstruct just part of an image using imreconstruct?

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

Logical Vectors: The relational operators can also be used with the vectors and matrices. For illustration, let's say that there is a vector, and we want to compare each eleme

Creating Customized strings: There are many built-in functions which create customized strings, including blanks, char, and sprintf. We know that the char function can be u

Animation: In this part we will observe a couple of ways to animate a plot. These are visuals, therefore the outcomes can't really be shown here; it is essential to type these

Use of logical vector: Determine how many elements in the vector vec were greater than 5, the sum function can be used on the resulting vector isg: >> sum(isg) ans =

Illustration of Logical vectors: Calling the function appears to return similar vector as simply vec > 5, and summing the result still works to determine how many elements wer

Built-in function for Differentiation: The MATLAB has a built-in function, diff that returns the differences between consecutive elements in a vector. For illustration, >>

Illustration of Advanced file input and output: For illustration, to refer to the third number in the first element of the cell array: >> subjdata{1}(3) ans =