go_list.m 540 B

1234567891011121314151617181920212223
  1. function list = go_list (exp0,exp1,exp2,exp3,exp4,exp5,exp6,exp7,exp8,exp9)
  2. ## usage: list = go_list
  3. ## (exp0[,exp1,exp2,exp3,exp4,exp5,exp6,exp7,exp8,exp9])
  4. ## Creates a list containing the expressions in the argument list
  5. ##
  6. ## Copyright (C) 2002 by Peter J. Gawthrop
  7. if nargin>10
  8. error("Only 10 expressions allowed in argument list");
  9. endif
  10. N = nargin;
  11. list=exp0;
  12. for i=1:N-1
  13. exp = eval(sprintf("exp%i;",i));
  14. list=sprintf("%s, %s", list, exp);
  15. endfor
  16. list = sprintf("{%s}", list);
  17. endfunction