Thread Subject: how to access results in Matlab from shell

Subject: how to access results in Matlab from shell

From: Jiaquan Huo

Date: 27 Oct, 2009 05:37:02

Message: 1 of 1

Hi,

I read on MATLAB Central about something like

result=$(echo "3+3"|matlab) to have the result of 3+3 calculated in matlab in the variable result in bash. I tried it on my Cygwin, but can't get 6 in the variable result.

With 'result=$(echo "3+3"|matlab), MATLAB is just not doing any calculation.

With 'result=$(echo "3+3"| matlab -r), MATLAB calculates 3+3, but the result is not returned in result.

What have I done wrong here?

Thanks for any advice in advance.

Jiaquan

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com