# Help With Do While Loops

I understand this question has been asked before but for some reason I can't get it to work also I'm new to stackexchage so I apologize if everything I write is not up to standards. That being While[procedure;test] In the code I'm currently working on I'm trying to make a matrix but only if it makes certain conditions. The Code as it currently stands is x=Table[RandomChoice[{1-alpha*E^(-1/Total[listA]),alpha,alpha*E^(-1/Total[listA]}->{-1,0,1}]*ListB[[i]]*ListB[[j]],{i,Length[ListB]},{j,Length[ListB]}] and I'm trying to make the code cycle through till it hits condition of Det[%]>0

• Would it be possible to give the full code that you are using and what your are hoping for as an output? It is not too clear from your question? Commented Nov 3, 2016 at 20:45
• I'm trying to get a table where the Det is a positive number. both List A and list B are simple lists, there is nothing complicated about them. Commented Nov 3, 2016 at 20:53
• Did you try While[x = Table[...]; Det[x] <= 0]? Commented Nov 3, 2016 at 21:27

listA = {1, 2, 3, 4, 5};