Is it possible to define an array to hold math operators [+ - * /] in Matlab?
I have an array of numbers [1 1 1 1], i.e. 4 digits. I would like to go over all possible digit combinations, changing the numbers in the array in a loop, and all mathematical operations between them (preferably changed within a loop as well), to see all the possible ways to get the number '24' with basic math operations from four digits.
I thought this might be written in only a few lines code, if it is possible to define such an array of operators in some sort.
Is it ?
Any other way to do that ?