Problem 242. Make a function that returns its own character count
Solution Stats
Solution Comments
-
1 Comment
Was only missing the transpose trick!
-
1 Comment
Sorry,:)
-
1 Comment
sorry for cheating, David's entry made me do it :)
-
3 Comments
this is strange... this works on my computer (win64 running matlab7.7) but not on the servers, perhaps is some different behavior of histc in the newer version? (and why not use 'hist' or 'accumarray' instead?)
Just using inspection, I see a space in your function (between "function" and "x9") whereas your code predicts no spaces.
thanks for the help! it seems in my version textscan(fid,'%c','CommentStyle','%','Whitespace','') removes the spaces from the resulting string...
Problem Recent Solvers16
Suggested Problems
-
Equidistant numbers containing certain value in an interval
85 Solvers
-
106 Solvers
-
Mimic foldl in functional programming
29 Solvers
-
331 Solvers
-
253 Solvers
More from this Author50
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!