Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. For example, find(X<5) returns the linear indices to the elements in X that are less than 5. To directly find the elements in X that satisfy the condition X<5, use X(X<5). Avoid function calls like X(find(X<5)), which unnecessarily use find on a logical matrix.

    • Nonzeros

      Use nonzeros to return the nonzero elements in a sparse...

    • Sub2ind

      This MATLAB function returns the linear indices ind...

    • Ind2sub

      To get the linear indices of matrix elements that satisfy a...

    • Find

      Pour rechercher des éléments de tableau qui satisfont à une...

  2. Find Array Elements That Meet Conditions. This example shows how to filter the elements of an array by applying conditions to the array. For instance, you can examine the even elements in a matrix, find the location of all 0s in a multidimensional array, or replace NaN values in data.

  3. Constructing a Matrix of Data. If you have a specific set of data, you can arrange the elements in a matrix using square brackets. A single row of data has spaces or commas in between the elements, and a semicolon separates the rows. For example, create a single row of four numeric elements.

  4. There are a couple of ways you can do this: Using the colon operator: startValue = 1; endValue = 10; nElements = 20; stepSize = (endValue-startValue)/(nElements-1); A = startValue:stepSize:endValue; Using the linspace function (as suggested by Amro): startValue = 1;

  5. There are a number of ways to create a matrix in Matlab. We begin by simply entering data directly. Entries on each row are separated by a space or comma and rows are separated by semicolons, (or newlines). We say that this matrix is of size 4-by-3 indicating that it has 4 rows and 3 columns.

  6. Create a matrix A with elements 1, 2, 3 in the first row and elements 4, 5, 6 in the second row. Square brackets are used to create a matrix. The elements in a row may be separated either by blanks or commas. Rows may be separated either by semicolons or newlines.

  7. 16 maj 2011 · If you have a vector of coordinate for a set of points, you might want to differentiate those points. To do that a concept called logical indexing will help you pull out a subset of those points easily. Here is a quick example (See the second video for more details)