Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2009
    Posts
    3

    Unanswered: Send command to matlab

    i guy ... if i run matlab in background

    Code:
    shell$ matlab &
    how can i send command from terminal to matlab ...


  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Talking pipe it!

    Try something like this:
    Code:
    exec 4>&1
    matlab >&4 2>&4 |&
    print -p My_Matlab_Command
    print -p whatever_command
    print -p exit
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Feb 2009
    Posts
    3
    don't work ...

  4. #4
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool Errors?

    Quote Originally Posted by zeeb10
    don't work ...
    What eroros do you get?

    Post EXACTLY what you are executing...
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  5. #5
    Join Date
    Feb 2009
    Posts
    3
    shell#> matlab >&4 2>&4 |&
    -bash: syntax error near unexpected token `&'
    --------------------------------------------------------
    if i do :

    shell#> matlab -nodisplay -nosplash -nojvm >&4 2>&4 &
    shell#> print -p prova\(\'\.\/3\.jpg\'\)
    -bash: print: command not found

  6. #6
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool Os

    What OS?
    Which shell?

    The example I posted work with Solaris, HPUX and RH Linux using ksh or bash shell.

    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •