Numbers spiral diagonals (Part 1)
Inspired by Project Euler n°28 et 58.
A n x n spiral matrix is obtained by starting with the number 1 and moving to the right...
Colon operator of two vectors
You are given two vectors of equal length: VecStart, VecEnd
Each vector contain a set of integers, where VecEnd(j)>=VecStar...
más de 3 años hace
Resuelto
Vectorize the digits of an Integer
Create a vector of length N for an integer of N digits.
x = 123045;
x_vec = [1 2 3 0 4 5];
I happened upon a trick ...
Number of Circles in a Number
Given a number, return the number of closed 'circles' in the base 10 numerical representation.
Note: the number 4 has no circ...