Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Ive checked and it does not work like that Commented Oct 24, 2015 at 23:31
  • @HUY what doesn't work like what? Please clarify. Also, seeing the result of you running this code would be very helpful. Commented Oct 25, 2015 at 8:49
  • So I ran modifying the code to echo the variables and it did, but the Matlab function just does not run. The Matlab screen comes up in the terminal but the code is not running. No error message is given I know it does not run because some files have to be created and none due. i suspect the problem is that since the $var1 are between the quotation marks "" in the phrase "functionmat($var1,$var2)" bash is not recognizing them as numbers. I also tried declaring the variables using the suggestion from below and it does not work either. Commented Oct 27, 2015 at 14:06
  • @HJY the shell doesn't care about variable types. If the code you gave us works with "functionmat(1,2)" you can replace that with var1="1" var2="2" followed by "functionmat($var1,$var2)". If that doesn't work then there is something else happening that you haven't identified Commented Oct 27, 2015 at 15:09
  • So in the end I answered this myself :/ Commented Oct 27, 2015 at 17:13