Community Profile


Ramon Villamangca

2 total contributions since 2018

Ramon Villamangca's Badges

  • Commenter
  • First Answer

View details...

Contributions in
View by

multiple digit number in to individual digits
a simple single line solution: >> num = 12345042117; >> arrayfun(@(x) mod(floor(num/10^x),10),floor(log10(num)):-1:0) ans =...

circa 2 anni ago | 0

How can I count the occurrences of each element in a vector in MATLAB?
This is how I did it: numOccur = sum(arrayfun(@(x) x == elem,vec)) where 'elem', is the element to search in the given v...

circa 2 anni ago | 0