how to fix this error -> Undefined function 'eq' for input arguments of type 'cell'.
2 views (last 30 days)
Show older comments
%%%%Calculate the number of times each element from netlist appears. %%%%
num_tot =(size(element));
num_tot = num_tot(1);
num_ind = sum(element(:) =='L');
num_res = sum(element(:) == 'R');
num_cap = sum(element(:) == 'C');
num_exc = sum(element(:) == 'E');
0 Comments
Accepted Answer
Star Strider
on 15 Nov 2017
Guessing here that ‘element’ is a cell array of some sort.
Try this:
element = {'L' 'R' 'C' 'E' 'L' 'R' 'C' 'E'}; % Create What I believe ‘element’ Is
num_ind = sum(strcmp(element, 'L'));
0 Comments
More Answers (0)
See Also
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!