Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- allinputs = {[1 2] [2 3] [3 4] [5 6]}
- A = []
- inputArray = inputBuilder(A,[],allinputs,1)
- function inputArray = inputBuilder(A,currBuild, allInputs, currIdx)
- if currIdx <= length(allInputs)
- for i = 1:length(allInputs{currIdx})
- mybuild = [currBuild allInputs{currIdx}(i)];
- inputBuilder(A,mybuild,allInputs,currIdx + 1);
- end
- if currIdx == length(allInputs)
- A = [A mybuild];
- %debug output
- mybuild
- end
- if currIdx == 1
- inputArray = A;
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement