Is cvx can run without desktop?

My Problem is:

  1. CVX software is downloaded and extracted in this folder: /home/Alex/Documents/cvx.2.1/
    I have a file using CVX named: “Optimization.m” is located at: /home/Alex/Desktop/Sum/
  2. Now i would like to run the file “Optimization.m” without desktop using command in shell (Ubuntu):

matlab -nojvm < Optimization.m > log (all the notification will be stored in the file “log”)
In the “log” i will see: Undefined function or variable ‘cvx_begin’, because i did not run the “cvx_setup”.
Therefore: i put the code:
"
cd /home/Alex/Documents/cvx.2.1/
cvx_setup
cd /home/Alex/Desktop/Sum/
"
inside the file “Optimization.m”, but the error still exist.

  1. But, when i open matlab in graphic, and “cd /home/Alex/Documents/cvx.2.1/”, then “cvx_setup”, it is successfully complete with no error.
    Anybody can tell me, is there any way to run cvx without desktop using matlab?

Thank you and best regards,