| | |
Calling Matlab functions from VS.NET
![]() |
•
•
Join Date: Jul 2006
Posts: 22
Reputation:
Solved Threads: 0
I have already posted this on Mathworks website, but currently till now nobody has been able to solve it.
Basically, I want to port over matlab code in .m format so I can call the matlab functions from a C code. I just followed a walk-thorough from matlab website and currently facing the problem as below. Hope someone can aid me in this regards
Tks.
http://www.mathworks.com/matlabcentr.../156810#394317
Basically, I want to port over matlab code in .m format so I can call the matlab functions from a C code. I just followed a walk-thorough from matlab website and currently facing the problem as below. Hope someone can aid me in this regards
Tks.
http://www.mathworks.com/matlabcentr.../156810#394317
•
•
•
•
Mark Jones <mark.jones@mathworks.com> wrote in message
<fdgahc$ona$1@fred.mathworks.com>...
> Hanifa wrote:
Hi,
With reference to this tutorial
How do I create a C shared library with MATLAB Compiler 4.0 that can be used in a Microsoft .NET 2003 project ?
http://www.mathworks.com/support/sol...0.html?1-UR7P0
I had followed this tutorial and was able to compile
successfully with some changes like instead of
$MATLAB\extern\include , I used the complete directory name.
However,the problems arose during runtime.
Upon hitting this line ---foolinInitialize()
A barrage of java errors(I presume) like
> > Warning: Could not read classpath.txt
> > Warning: Could not read librarypath.txt... etc..
> > But I clicked Ok for all these diaglog boxes.
But alas, I received this error,
> > ??? Undefined function or variable 'matlabrc'.
After some googling, I found this site
http://www.mathworks.com/access/help...G=Search&meta=
This was solution given there
> > Undefined function or variable 'matlabrc'. When MATLAB or
> > the MCR starts, they attempt to execute the M-file
> > matlabrc.m. This message means that this file cannot be
found.
> > To work around this, try each of these suggestions in this
> > order:
> > -Ensure that your application runs in MATLAB (uncompiled)
> > without this error.
> > -Ensure that MATLAB starts up without this error.
> > -Verify that the generated CTF archive contains a file
> > called matlabrc.m.
> > -Verify that the generated code (in the
> > *_mcc_component_data.c* file) adds the CTF archive directory
> > containing matlabrc.m to the MCR path.
> > -Delete the *_mcr directory and rerun the application.
> > -Recompile the application.
I have tried all the suggestions except this one.."Verify
that generated CTF...... to the MCR path" as I dont know how
check whether mcc_component adds matlabrc.m file to MCR path.
Anyone can give me any suggestion or help on how to go about
solving this..
Thanks.
••••Hi Hanifa,
>
For example, after you attempt to run your application you
will have a *_mcr directory. If you search that directory for
matlabrc.m you should
find it under *_mcr\toolbox\local
And, if you look inside *_mcc_component_data.c, where it
defines MCC_*_matlabpath_data you should see "toolbox/local/".
However, whether you find "toolbox/local/" in the .c file
or not, I would suggest that you submit a help request at:
http://www.mathworks.com/support/
They should be able to help you troubleshoot this more
thoroughly.
Mark••••Hi Mark, thanks for the reply..
I did find matlabrc.m in the toolbox but under this directory
foolib_mcr\toolbox\compiler\deploy
Anwyway I have put up a bug at website, you have given.
Hopefully, there is a resolution to this problem.
Last edited by hanifa; Sep 27th, 2007 at 10:57 pm. Reason: More approaprate title
![]() |
Similar Threads
- MatLab Forum? (DaniWeb Community Feedback)
- Translating from Matlab to C (C)
- matlab program help (Legacy and Other Languages)
- Matlab - figure caption (Computer Science)
- translation of Pascal script into matlab (Pascal and Delphi)
- Building D.L.L in Matlab (Visual Basic 4 / 5 / 6)
Other Threads in the C Forum
- Previous Thread: Alpha blend algorithm
- Next Thread: C and Phyton on Linux
Views: 3440 | Replies: 0
| Thread Tools | Search this Thread |
Tag cloud for C
#include api array arrays binary binarysearch bit c++ calling char character code coke command conversion convert copy database decimal directory directorystructure drawing dude dynamic ebook error exec executable factorial fgets file fork framework free function functions givemetehcode givemetehcodez grade graphics gtkgcurlcompiling haiku help|help|help|help homework i/o input insert int integer intmain() lazy libcurl line linked linkedlist linux list lists loop lowest malloc matrix memory mysql no-effort output parallel path permutations pointer pointers problem process profile program programming read recursion recursive recv reverse scanf segmentationfault socketprograming spoonfeeding stack string strings strtok structures student system testing turbo-c turboc unix user variable windows _getdelim





