Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How to install the CVX (Convex Optimization) library in Matlab?

- I would wanna inquire about how to install the CVX library and get it full functioning in Matlab.

user-image
Question added by Yahya Badawi , Missile Orientation and Radar Guiding officer , Egyptian Armed Forces
Date Posted: 2014/02/26
AMER ALOMARI
by AMER ALOMARI , Quality Engineer , GKN DRIVELINE

Hello, try to follow these instructions:

 

Basic instructions

  1. Retrieve the latest version of cvx from http://www.stanford.edu/boyd/cvx. You can download the package as either a .zip file or a .tar.gz file.

  2. If you have been running a previous version of cvx, remove it or rename it to, say, cvx_old—before proceeding. DO NOT allow the new version of cvx to be unpacked on top of the old.

  3. Unpack the file anywhere you like; a directory called cvx will be created. There is one important exception: do not place cvx in Matlab’s own toolbox directory.

  4. Start Matlab.

  5. Change the current directory to the location of cvx. For example, if you un-packed cvx.zip into the directory C:\\Matlab\\personal, then you would type        cd C:\\Matlab\\personal\\cvx at the Matlab command prompt. 

    Alternatively, if you unpacked cvx.tar.gz into the directory ~/matlab on a Linux machine, then you would type

    cd ~/matlab/cvx

    at the Matlab command prompt. 

  6. Type the command cvx_setup at the Matlab prompt. This does two things: it sets the Matlab search path so it can find all of the cvx program files, and it runs a simple test problem to verify the installation. If all goes well, the command will output the line. No errors! cvx has been successfully installed.                (among others). If this message is not displayed, or any warnings or errors are generated, then there is a problem with the cvx installation. Try installing the package again; and if that fails, send us a bug report and tell us about it.
  7. If you plan to use cvx regularly, you will need to save the current Matlab path for subsequent Matlab sessions. Follow the instructions provided by cvx_setup to accomplish that. 

 

REF. cvx Users’ Guide for cvx version1.21

 

January,2011

Link: http://orion.math.uwaterloo.ca/~hwolkowi/henry/teaching/w11/367.w11/367miscfiles/cvx_usrguide.pdf 

 

 

More Questions Like This