I used most of ideas but it did not work then with the help of what herohuyongtao said i reach to this idea which worked properly

 [nr,nc]=size(x)

Which nr is the number of rows thanks all of you.

Answer from SaraDean on Stack Overflow
🌐
MathWorks
mathworks.com › matlabcentral › answers › 23449-return-the-number-of-rows-of-an-array-of-cell-data
Return the number of rows of an array of cell data - MATLAB Answers - MATLAB Central
December 8, 2011 - I tried to use the find function but it doesnt seem to work becasue it tells me: Undefined function or method 'find' for input arguments of type 'cell'. Help on this is much appreciated. Sign in to comment. Sign in to answer this question. ... https://www.mathworks.com/matlabcentral/answers/23449-return-the-number-of-rows-of-an-array-of-cell-data#answer_30774
🌐
MathWorks
mathworks.com › matlabcentral › answers › 430843-how-to-find-the-total-number-of-elements-in-individual-row-of-a-cell-array
How to find the total number of elements in individual row of a cell array? - MATLAB Answers - MATLAB Central
November 19, 2018 - C = {[1; 2; 3]; [2; 1; 3, 4]; [3; 1; 2]; [1; 2]}; Here, in first row, elements are 1,2,3,1 | total number of elements = 4 in second row, elements are 2,1,1,2 | total number of elements = 4 in...
🌐
Northwestern University
ece.northwestern.edu › local-apps › matlabhelp › techdoc › ref › mat2cell.html
mat2cell (MATLAB Functions)
The sum of the element values in m must equal the total number of rows in x. And the sum of the element values in n must equal the number of columns in x. The elements of m and n determine the size of each cell in c by satisfying the following formula for i = 1:length(m) and j = 1:length(n): ...
Find elsewhere
🌐
MathWorks
mathworks.com › matlabcentral › answers › 671448-wrong-number-of-rows-of-cell-array-using-length-function
wrong number of rows of cell array using length()-function - MATLAB Answers - MATLAB Central
December 1, 2020 - My cell array is: Traj_interpl = 1×209 cell array ... Why in the 59 cell the length give me a right amount of rows and in a 209 cell a wrong one? How can I avoid this? Thank you! Sign in to comment. Sign in to answer this question. ... https://www.mathworks.com/matlabcentral/answers/671448-wrong-number-of-rows-of-cell-array-using-length-function#answer_561493
🌐
MathWorks
mathworks.com › matlab › language fundamentals › data types › data type conversion
mat2cell - Convert array to cell array whose cells contain subarrays - MATLAB
Each element of rowDist specifies the number of rows in the subarray that is in the corresponding cell of C. The sum of the elements of rowDist must equal the number of rows of A. ... The mat2cell function fully supports thread-based environments. For more information, see Run MATLAB Functions ...
🌐
MathWorks
mathworks.com › matlab › language fundamentals › matrices and arrays
numel - Number of array elements - MATLAB
Input array, specified as a scalar, vector, matrix, multidimensional array, table, or timetable. If A is a table, numel returns the number of elements in the table, A, equivalent to prod(size(A)). Variables in a table can have multiple columns, but numel(A) only accounts for the number of rows and number of variables.
🌐
Delft Stack
delftstack.com › home › howto › matlab › determine the number of columns of a matrix in matlab
How to Get the Number of Columns of a Matrix in MATLAB | Delft Stack
February 2, 2024 - It returns a vector of positive integers, where each element corresponds to the size of a particular dimension. For a 2D matrix, the first element indicates the number of rows, and the second element denotes the number of columns.
🌐
MathWorks
fr.mathworks.com › matlabcentral › answers › 20499-count-rows-in-matrix
count rows in matrix ? - MATLAB Answers - MATLAB Central
It's simple. You can see the size of the first column, that will be the rows in matrix. ... Connectez-vous pour commenter. ... For counting the number of rows in a matrix you can use the size funtction and pass your matrix in it