|
Just login and then download.
A. Riazi
|
|
|
|
|
Dear i am working on image processing so i want to use MATLAB functions like FFT,DFT etc.how can i use that functions in VC#.NET.and which MATLAB version me need, what's the way to make .dll or .com for C#.please reply me soon because it's my final project for my BS.
|
|
|
|
|
for accessing the matlab functions in C# you need to have a compiler and matlab builder for .NET installed Version 7 of matlab will support it (i am working with version 7 dont know about other versions)
you need to make a dll for your matlab cod using the deploytool and add it as a reference in your C# code
The matlab help document coming along with the .net builder will help you do ur work.
Sindhu krishnan
|
|
|
|
|
Thanks Sindhu krishnan for your reply.
i have VS.NET 2005 and MATLAB 7.0 can you please send me a simple example for it that how to convert the MATLAB code into DLL and then use it in .NET.
Please reply me soon.
Thanks again for your reply.
Shakeel
|
|
|
|
|
Hi All,
I need help in using debugger with MATLAB .net NE builder.
I have a VB project in C# and a project in MATLAB,
I created a MATLAB dll(matlabtest.dll) using deployment tool with target as .NET assembly. Then in VB project I gave the reference of matlabtest.dll.
Then in VB project via debug--> "attached to process" I attached the MATLAB.exe.
On starting the execution of VB project in debug mode the entire execution goes well, but when I try to debug the matlab.dll, I am not able to step-in into the matlab code. The execution is not hitting any break point in MATLAB code.
am I missing any step in configuration,
any help would be highly appreciated.
Dhruva Kumar
|
|
|
|
|
Hello,
I am trying to compile a Matlab .m file into .c and to produce an executable.
As a test I wrote the following Matlab function:
function sample2(a)
fprintf('a=%d\n',a);
as you can see, this is a one line function that simply prints the value of a.
Afterwards I compiled it with:
mcc -mg sample2.m
This has indeed produced the appropriate c files and exe and the executable do ran.
There is only one problem; When I write in the command line: sample2 3 (in order to run the exe) the output is 'a=51', that is, the ascii value of 3 is printed. When I ran the Matlab function inside Matlab the output is fine, that is, 'a=3'.
Can you help me?
Thanks,
Amit
|
|
|
|
|
Hello everybody,
I'm developping in Delphi 2005 and my question is if it's possible to compile a dll with MAthlab and to use it with Delphi for my software.
Thanks for your help.
|
|
|
|
|
I also programmed in Delphi, and interested for Malab libraries first to use them in Delphi. Later, I started with Borland Cpp.
Unfortunately, there is no much hope for Delphi. Matlab generate function declarations, and already have header files for its libraries. If you want to use this libraries, you must rewrite these declarations in Delphi, and even after that I think it would't work. For dinamical linking it is harder and I don't know the solution.
|
|
|
|
|
Please helpme!!!
I have a simple function in MatLab 7 R14 Sp1:
function DispMsg;
msgbox('Success','Message Title');
I compiled it with MatLab compiler version 4.1 with this command:
mcc -W lib:DispMsg -T link:lib DispMsg.m
When I use the following VB6 code I get an error #453 Can't find DLL entry point...
Private Declare Function DispMsg Lib "D:\Data\DLL Compiler\DispMsg.dll" () As Long
Private Const DEF_SCRIPT_DLL As String = "D:\Data\DLL Compiler\DispMsg.dll"
Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long
Private Sub cmdCallDll_Click()
On Error GoTo PROC_ERR
Dim lngRet As Long
Dim ret As Integer
' -- Works as expected
lngRet = LoadLibrary(DEF_SCRIPT_DLL)
If lngRet <> 0 Then
' -- Should call a simple messagebox
Call DispMsg '<- Raises error
' -- Check
If ret = 0 Then
MsgBox "Call to TestScript failed ", vbExclamation, "DLL Test"
Else
' Add code...
End If
Else
MsgBox "Could not load dll '" & DEF_SCRIPT_DLL & "' ", vbExclamation, "DLL Test"
End If
PROC_EXIT:
' -- Clean up
If lngRet <> 0 Then FreeLibrary lngRet
Exit Sub
PROC_ERR:
Err.Source = "modCode::Main(Sub)"
MsgBox Err.Description & vbCrLf & vbCrLf & _
"Error Number " & Err.Number & vbCrLf & _
"Error Source " & Err.Source & " ", vbExclamation, "DLL Test"
Debug.Print Err.Description
Resume PROC_EXIT
End Sub
I will appreciate any suggestions.
Boris
boris_velen@swissre.com
Boris
boris_velen@swissre.com
|
|
|
|
|
hey icesktr1
have u got a solution ?
bcz I also need the solution ...
plz let me know how to connect between VB6 and Matlab
I will be waiting ..
kindly contat me
kashifishaq@msn.com
|
|
|
|
|
Please can u help me because i want to use c++ dll through matlab and i don't know how.
please help me, it's urgent ...
urgent !
|
|
|
|
|
Hello all.
I have C++ ver 6.0 on my computer and matlab R12 on another computer (license problems).
I have followed math works insrturctions for Solution Number: 1-18CBI, which is "How do I create a C - shared library with MATLAB Compiler 3.0".
Due to the different computer problem i have copied matlab libraries which are required to be included in the C++ project
$MATLAB\extern\include\cpp;
$MATLAB\extern\include;
$MATLAB\extern\lib\win32\microsoft\msvc60;
This doesnt work !!!! how come?
at the begining i had to add some *.dll and *.h files.
when i have finished, nothing happens and the c++ says it has an external link problem
pls advise.
Regards
Udi
|
|
|
|
|
I try to compile your exemple in matlab(6.5): mcc -t -L C -W lib:MeanFunctionLib -T link:lib MeanFunction.m libmmfile.mlib but I have error with mcc.dll . why?????????please help me.
Thanks
I whould to use it in builder c++(6.0)
lamionne
-- modified at 13:52 Saturday 18th March, 2006
|
|
|
|
|
Hi lamionne,
were you able to Solve the error of mcc.dll. I am geeting the same error with all the matlab codes. Is there any setting which needs to be changes.
Kindly help me out.
regards.
Kumar Shwetaketu
India.
|
|
|
|
|
I havn't too mutch time.I need a librerie whitch solves quadratic programs ,or via matlab(quadprog).how ca I do this.I develop in builder c++(6.0).
Thanks
lamionne
|
|
|
|
|
I work with builder c++ (6.0)
and I want to use matlab's function witch is quadprog.
I try to build it but I have an error message in relation with mcc.dll.
please help me
lamionne
|
|
|
|
|
Hi there,
how are you doing?
I want help in image processing toolbar, iam making project (for image
enhancement and motion detection) functions in and want to
conver
them in .dll and connect it with the C# project
How to return value from matlab functions as images into C# (as bitmap)
PLEASE URGENT HELP REQUIRED, I HAVE COMPLETED THE MATLAB FUNCTIONs AND
NOW HAVE TO CONNECT WITH THE C#.......
THANKING YOU
HAROON, ISB PK
There are Things you cannot Do, and there are Words you cannot Say
|
|
|
|
|
Dear A. Riazi,
Salam Alekum Wa Rahmet Allah Wa Barakatuh.
I have probelm in converting my MATLAB program to C code. So can u help me concerning this problem.
I already tried to use mcc command with all appotinuity which this command offers.
I am needing a solution for urgent.
Appreciate your cooperation previously
|
|
|
|
|
Please help.
I'm getting the error, when I'm trying to execute the project:
Loaded 'ntdll.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.
First-chance exception in MatlabSharedLib.exe: 0xC0000005: Access Violation.
|
|
|
|
|
Do you get this when executing the mclInitializeApplication (NULL , 0); ?
Or when executing the "YourLib"Initialize() ?
In case of the first, be sure to have the DLL and the CTF at the same place as your EXE.
Also, you can enter the path to the CTF (what happens to be the same as to your exe) in the project properties unter "General - Debugging - Working Directory".
In case of the second, I would be glad to have that solved.
I am thinking that there is some conflict with DLLs of mine, but I have no idea how to get rid of it.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
Hi,
I have the same problem on VC++ 6.0, windows XP, SP2.
If you remove mclInitializeApplication(...) function call the error will dissapear.
When I compile my project i don't have any error or warning but when i try to debug it the "First-chance exception in liba.exe: 0xC0000005: Access Violation." debug message appear and the execution is broken in mainCRTStartup().
I notice that i'm using liba.lib and mclmcr.lib to link it(liba.lib is the library generated by Matlab Compiler for my matalb function). In the same time the CTF and DLL files are in the same place with the exe file.
Can you help me in this way?
|
|
|
|
|
Bonta Marian S wrote: If you remove mclInitializeApplication(...) function call the error will dissapear.
But then you are unable to call matlab-code, as it is uninitialized...
Bonta Marian S wrote: "First-chance exception in liba.exe: 0xC0000005: Access Violation."
"First Chance exceptions" are normal. It seems as if the Matlab-guys use exeptions as normal ways of code control.
In the debugger, you can select somewhere, that you only want to break on second chance-exceptions, that is unhandled exceptions.
I am sorry that I can not point out where it is or what the exact name of the setting is, but I am using only VC 2003 and 2005.
-- typo fixed at 13:11 Wednesday 4th July, 2007
Failure is not an option - it's built right in.
|
|
|
|
|
Hi,
It's seems to be some problems when you try to use this method (MATLAB Shared Library) on VC++ 6.0.
To avert this problem you can use MATLAB Visual Add-in feature. This feature is available from Matlab 7.x and offers you a simple method to use the Matlab code.
|
|
|
|
|
I am a new user. I have a library and I want to add it to the system that I have. Can someone please help me out. I already do have the library but I want to add it to the system that I have
|
|
|
|
|
have a simple M-file in matlab environment, i want to work it in C# .NET
function y = foo(x)
y = x+1;
first of all i compil the Mfile to COMObject ,i use matlab 'mcc' function :
mcc -B 'ccom:addin,addin,1.0' foo.m
i basic on this sample :
-t -W com:<component_name>,<class_name>,<version> -T link:lib
in this link : http://www-rohan.sdsu.edu/doc/matlab/toolbox/compiler/mcc.html
secondly i open a winApplication in .NET 2003 and add the dll in 'Add
References'
after that i create a new object from the dll that matlab compiler
build (addin.dll in my case),and try to usa it , the .NET recognize
and fill my after dot foo founcatio.
i try to run it and get a Runtime Error !:
"Microsoft Visual C++ Runtime Library
abnormal program temination"
if u can help me , i be grateful.
Thx
|
|
|
|