Hi,
I am running MATLAB from a linux machine! Following is my problem
When I run any linux command in MATLAB using system or unix, it returns 0 as status but when I use the echo option in MATLAB or in terminal it doesnt display anything in the terminal!
I want to declare a variable in linux, assign it a value through matlab before running a func and then and after func executed change it to a different value!
cmds in matlab are:
% To set
[status] = system('export MYVAR1="1"')[status] = system('export MYVAR1="1"','-echo')[status] = unix('export MYVAR1="1"')[status] = unix('export MYVAR1="1"','-echo')%To view
[status] = system('echo $MYVAR1')[status] = unix('echo $MYVAR1')[status] = system('echo $MYVAR1', '-echo')[status] = unix('echo $MYVAR1', '-echo')
In all cases status = 0 but neither it displays in the execution window nor on the terminal window I am running MATLAB from!
Regards,
MANAS
Best Answer