I'm trying to make two matrices for 6 random numbers, and the three different numbers of each need to sum up to 1. ex)P1+P2+P3=1 . How can I make this?? thanks. this is some part of my script file.
if (P1+P2+P3==1) && (Q1+Q2+Q3==1)
P=[P1 P2 P3];
Q=[Q1; Q2; Q3];