Mex compiler error handling in MATLAB and GCC installation in Ubuntu

I, MATLAB use mex error and GCC installation of a variety of problems to solve.

when I run my program, I notice that the “model” in the image below has not defne. (undefined)

access to a number of data, walk a lot of detours, only to find that the original is tex-mex file not compile.
then, compile tex-mex file, enter: tex-mex – setup
found an error again: “No supported compiler or the SDK was found.”

open baidu began to browse a variety of, dazzling methods… In fact, you only need to download the supported compiler or SDK.

is here, and since I’m ubuntu’s matlab for Linux, all I need to do is install GCC.

the steps are as follows:

sudo apt-get build-dep GCC

sudo apt-get  build-dep  gcc  

after the above method is used, the following situation occurs:

Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

enter the command:

sudo rm /var/lib/dpkg/lock
sudo dpkg --configure -a

when you run the initial command, the following situation occurs:

Unable to locate package
execute:

sudo apt-get update

start installation… Error:

, possibly due to network or other conflicts

ubuntu apt-get (You must put some ‘source’ URIs in your sources. List)
E: You must put some ‘source’ URIs in your sources. List

solution:

sudo vi /etc/apt/sources.list

open an editor and type:
copy code

deb-src http://archive.ubuntu.com/ubuntu trusty main restricted #Added by software-properties
deb-src http://gb.archive.ubuntu.com/ubuntu/ trusty restricted main universe multiverse #Added by software-properties
deb-src http://gb.archive.ubuntu.com/ubuntu/ trusty-updates restricted main universe multiverse #Added by software-properties
deb-src http://gb.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse #Added by software-properties
deb-src http://security.ubuntu.com/ubuntu trusty-security restricted main universe multiverse #Added by software-properties
deb-src http://gb.archive.ubuntu.com/ubuntu/ trusty-proposed restricted main universe multiverse #Added by software-properties

copy code
press Esc, enter: wq, then enter the command:

sudo apt-get update

: “E45: ‘readonly’ option is set (add! To override)

this is authority, set file into read-only permissions, as is known to all, read-only files need to be performed prior to such modification sudo, but have changed, how to enforce save?Geeks tell you! Just save and execute the following command:

:wq! The above command is to force save exit, and then you can!

try again to run sudo apt-get build-dep GCC, again failed.

method 2: enter the command: sudo apt-get install build-essential

sudo apt-get  install  build-essential

start installation, successful.

Windows of matlab in tex-mex compilation fails, go to https://ww2.mathworks.cn/support/requirements/supported-compilers.html directly download the corresponding matlab version of MinGW C/C + + 6.3.

Finally, enter MTALAB and enter met-setup


choose first.
raises a problem to be solved: train a decision tree, use the random forest classifier to extract the features of the input image, and output the frequency image??


Read More: