This partition function might help. Call plist=partitions(100,1:100,[],3); and you will get a 833x100 matrix where the sum of the index of every row times its value is 100. Should be a 'simple' job to convert that to x1, x2 and x3 values ;) (if you are stuck I like to "manually" do 1, 2 or even 3 repetitions and then identify what it is you do - and convert that to loop language).
The "challenge" is that there are 833 combination possibilities, and the function does not repeat combinations (so if 33%, 33% and 34% has occured, then 34%, 33% and 33% will not occur), so you will have to write some logic, probably... but I think this is a great place to start in regards to the possible combinations conundrum!