Steph123

92 Reputation

2 Badges

18 years, 23 days

MaplePrimes Activity


These are answers submitted by Steph123

Thanks for those very helpful points.
Thanks for those very helpful points.
I'm not sure how to do this for what I am doing. A simple example of my code is: her:=proc(i) for j in [k[1],k[2],k[3]] do for z in [1,2,3] do if is(solve(A[i][3,z]=T[z]-1,j),integer) then print(j=solve(A[i][3,z]=T[z]-1,j)); break; end if; end do; end do; end; where A is some matrix and T is some vector. Now with this code sometimes it can give results, k[1]=2; k[2]=2; or k[3]=1; or k[1]=2; k[2]=4; k[3]=2; and so on depending on A and T. But I don't know how to make this output as a sequence. I'm sorry if this is quite simple, but I'm not really very good with MAPLE.
I'm sorry, I hadn't previously read all those other comments. thank you very much. I just needed that procedure for inside a larger thing. If I refer you to Tim Van Dusen's post "not quite what I meant", I was wondering how to get the values, as a list, instead of just printing them; so I could use this later. So [1,2] instead of 1 2
Thanks for your suggestions. What would I do if I wanted the output to be separated by commas. With the print I would get say, 1 2 but how would I get the output as 1,2
wow.. I think I made it actually happen.
Is there any way I can extend this to giving all permutations of, say a 2 by 4 matrix (in this case). So all the permutations of 1100 in the first and second row of a matrix? i.e. (1 1 0 0) (1 1 0 0) (1 1 0 0) (1 0 1 0) (1 1 0 0) (1 0 0 1) etc
Page 1 of 1