About 547,000 results
Open links in new tab
  1. numel - Number of array elements - MATLAB - MathWorks

    This MATLAB function returns the number of elements, n, in array A, equivalent to prod (size (A)).

  2. matlab - How can I count the number of elements of a given …

    May 21, 2010 · SOLUTION : You can use this function in conjunction with the built in matlab function, "unique". occurance_count will be a numeric array with the same size as that of …

  3. How to count the each number of row within a array in matlab

    Jul 27, 2013 · You can use ==1 on the entire matrix A, and then sum along the rows. As in sum(a==1,2); (see sum documentation).

  4. counting the number of elements under multiple conditions - MATLAB

    Feb 1, 2017 · Winners= numel (y (rows)>0); %Counts the number of elements that are greater than 0.

  5. arrays - How can I count number of occurrences of unique row in MATLAB ...

    Oct 17, 2017 · The third output of unique gives you the index of the unique row in the original array. You can use this with accumarray to count the number of occurrences. For example: A …

  6. Count the number of times a value occurs in a specific of an array

    Given a array, is there any way to count the number of times a value occurs within a specific row of that array?

  7. How do I count the number of rows in a cell array's cells?

    Jan 17, 2018 · I understand that it's better to preallocate memory size and then truncate empty rows rather than have an array grow with each loop repetition. So I wish to count the total …

  8. Matlab counting elements in array - Stack Overflow

    Oct 2, 2012 · You can use the hist function to do this. fprintf('Row counts\n'); disp([-1 0 1]) fprintf('\n') for row = 1:3 disp(hist(m(i,:),3)); end yields Row counts -1 0 1 1 3 2 2 1 3 1 3 2

  9. Count number of specific values in matrix - MathWorks

    I have a large matrix, m, and am trying to count the number of a specific value (i.e. How many indexes are of the value 4?)

  10. Matlab Count | Comprehensive Guide to Matlab Count - EDUCBA

    Mar 27, 2023 · To find the presence of a particular event in the Matlab program count command is used. If an input is a string then by using this command we can find out how many times a …

  11. Some results have been removed
Refresh