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...
🌐
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
Find elsewhere
🌐
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): ...
🌐
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.
🌐
MathWorks
mathworks.com › matlabcentral › answers › 435931-how-to-count-the-number-of-elements-of-a-cell-having-string-and-integers
How to count the number of elements of a cell having string and integers? - MATLAB Answers - MATLAB Central
December 15, 2018 - Putting the result of cellfun in one array then iterating to copy to a second array is unnecessary, even if the number of rows in pathws_count2 and sub_stage_col2 is different (then you can set only the desired rows. ... unless SS is a matrix with more than one column (or a row vector), in which case, you will probably get an exception since it's like calling ... https://www.mathworks.com/matlabcentral/answers/435931-how-to-count-the-number-of-elements-of-a-cell-having-string-and-integers#comment_651092
🌐
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 › matlabcentral › answers › 82112-how-to-find-out-number-of-rows-in-particular-matrix-of-the-cell
how to find out number of rows in particular matrix of the cell? - MATLAB Answers - MATLAB Central
July 15, 2013 - Azzi, as I understand it, cellfun('size',a,1) is the preferable way to do this, as the anonymous function call is not optimized like the string arguments to cellfun. ... Elapsed time is 0.000631 seconds. ... Elapsed time is 0.000290 seconds. ... Elapsed time is 6.095846 seconds. ... Elapsed time is 0.011584 seconds. ... https://www.mathworks.com/matlabcentral/answers/82112-how-to-find-out-number-of-rows-in-particular-matrix-of-the-cell#comment_159945