Skip to main content

Posts

Showing posts with the label C Program in MATLAB

Running C Program in MATLAB

In order to run your C codes, the program should include mex.h header. So please make sure before running. To start with you enter mex -setup the matlab display the following.. Welcome to mex -setup. This utility will help you set up a default compiler. For a list of supported compilers, see http://www.mathworks.com/support/compilers/R2013a/win64.html Please choose your compiler for building MEX-files: Would you like mex to locate installed compilers [y]/n? and just type ‘y’ and it display all the available compiler, but if you couldnt find any, you should install some compatible compilers. I have already installed SDK 7.1 which is compatible with MATLAB 2013 Select a compiler: [1] Microsoft Software Development Kit (SDK) 7.1 in C:\Program Files (x86)\Microsoft Visual Studio 10.0 [0] None Choose 1 and its all done To compile keep the .c file in the current folder and enter mex filename.c This creates a filename.mexw64 and from now u can run the c files in...

Installing SDK 7.1 in Windows 10 (For MATLAB)

I  have faced some problems in installing SDK 7.1 in windows 10 and here is what worked for me. First Check what version of SDK ur MATLAB supports. Im using MATLAB 2013 and it supports only SDK 7.1 and i think most MATLAB versions support it. (I have already installed VS 2015 and .net 4.5 and so there are some issues as SDK 7.1 requires .net 4 for installation) Here the first thing to start with..  Download SDK 7.1 from this link http://www.microsoft.com/en-us/download/details.aspx?id=8279 While installing it display Windows SDK components require .NET framework 4 and due to pre release version it cannot be installed and you have to rerun setup. Simply Click ok and continue. You can download the missing C++ compliers manually at the following link:  http://www.microsoft.com/en-us/download/details.aspx?id=4422 Just download and install. Now you can interface it with MATLAB. U can find how to interface and run C code in the following link http://imagepro...