-
1 Comment
Matthew Jones
on 26 Apr 2017
When I run the following solution for Test Suite #1, I get a zero in my solution array. If I replace c(i) with c, I get back a 2 and 3 (no zero). What is going on that a zero shows up?
[count, val] = histcounts(categorical(vect))
val = cellfun(@str2double, val) % convert val from string to numerical
for i = 1:length(count)
if count(i) == 3
c(i) = val(i)
end
end
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!