How to use matlab function in C++ program .

5 views (last 30 days)
Ying Ren
Ying Ren on 24 Jul 2013
I want to use fuction [x,b]=eig(A)to calculate the eigenvectors and eigenvalues of matrix A in my C++ program.I try to definite a new function to change the interface of the function,such as: function [X]=eigen(A) %#External [X,b]=eig(A) end
then ,I want to mcc .m file to .cpp.I input mcc -m eigen.m eigen.cpp in matlab cmd.It works out the first time,but after I did some change in eigen.m and mcc again ,it comes out the error: D:\PROGRA~1\MATLAB\R2010B\BIN\MEX.PL: Error: eigen.cpp not found.How to solve it.*bold*
  7 Comments
kjetil87
kjetil87 on 24 Jul 2013
Edited: kjetil87 on 24 Jul 2013
it is simply under "Build" and "Main File" : Add main function file (programs entry point )
Ying Ren
Ying Ren on 25 Jul 2013
I think the problem is:matlab install incorrectly.This is the Chinese link for how to install matlab2012b http://www.doc88.com/p-0364732349155.html

Sign in to comment.

Answers (0)

Categories

Find more on Standalone Applications in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!