Was only missing the transpose trick!
sorry for cheating, David's entry made me do it :)
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...
Sort a list of complex numbers based on far they are from the origin.
Indexed Probability Table
What is the distance from point P(x,y) to the line Ax + By + C = 0?
Apply a function array to an array of numbers
Determine the Result of a Move in Reversi
Find the stride of the longest skip sequence
Give a matrix that matches itself when rotated
Repopulate the City
Cell Counting: How Many Draws?
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office