Hi all,
Here is what I've done:
- Used Matlab>deploytool>.net assembly to create a dll
- Added reference to all the required files in C#
- Ran a program using a matlab test function for adding numbers which ran correctly
The problem I'm facing is with the symbolic toolbox of matlab. I wrote a simple function for solving two equations and return a logical value if there is an intersection between the curves.
function Range = MatCurveIntersection(Curve1,Curve2 )c1 = sym(Curve1);c2 = sym(Curve2);%Solve the two equations
x=solve(c1-c2);y=double(x);%Check to see if the two curves intersect
Range=isreal(y)&(~isempty(y));end
Now, when I run the C# program, i get an error: "undefined function or method 'sym' for input arguments of type 'char'"
Troubleshooting:
- The code runs correctly in Matlab
- Verified that the versions of Matlab and symbolic toolbox match
- Verified the existence of sym.m
I cannot figure out what the problem is. Help Please!
Best Answer