Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function matriz = posibles(n,m)
- b=@(a,c) 2*n+m-4*c-3*a;
- d=@(a,c) 2*a+3*c-m-n;
- matriz=[];
- for a=0:floor((2*n+m)/3);
- for c=ceil((m+n-2*a)/3):floor((2*n+m-3*a)/4);
- if c<0
- continue
- end
- matriz=[matriz;a,c];
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement