is there a way to run a matlab script from linux command line? For instance, I have the following simple script "test.m":
x = [1,2,3];
y = [2;3;4];
prod = x*y
disp(prod)
So what I want is to be able to execute that script from the linux command line without opening the matlab GUI or the matlab command line. That is, I expect something like that:
~$ matlab test.m
and I expect to see the result of the product on the linux command line.
I know that you can do that with python e.g.,
~$ python test.py
but was wondering if the same can be achieved with matlab.