gino.m 921 B

1234567891011121314151617181920212223242526272829
  1. function res = gino (op,arg1,arg2,arg3)
  2. ## Gino is the octave interface to ginsh - the GiNaC shell interface.
  3. ## The simplest way to use gino is via the octave functions go_fun.
  4. ## where "fun" is a ginsh function - type gino("??") for a list.
  5. ## usage: res = gino (op,arg1,arg2,arg3)
  6. ##
  7. ## Please set default_eval_print_flag = 0
  8. ##
  9. ## Part of the gino (ginsh-octave) toolbox
  10. ## Copyright (C) 2002 by Peter J. Gawthrop
  11. if nargin<1
  12. error("usage: gino(op,[arg1,arg2,arg3])p");
  13. elseif (nargin==1)||(length(arg1)==0)
  14. go_in = sprintf("%s", op);
  15. elseif (nargin==2)||(length(arg2)==0)
  16. go_in = sprintf("%s(%s)", op, arg1);
  17. elseif (nargin==3)||(length(arg3)==0)
  18. go_in = sprintf("%s(%s,%s)", op, arg1, arg2);
  19. elseif (nargin==4)
  20. go_in = sprintf("%s(%s,%s,%s)", op, arg1, arg2, arg3);
  21. else
  22. error("usage: gino(op,[arg1,arg2,arg3]");
  23. endif
  24. res = ginsh(go_in);
  25. endfunction