|
|
Comments and Discussions
|
|
 |

|
please tell me how can i use matlab functions in msvc while i am using matlab 7(r14) and msvc 6.0............
|
|
|
|

|
Hi,
I have written a traffic simulator based on C language, and I launch it using the Matlab engine functionality after compiling it with LCC.
Everything works well as long as I only pass single double variable from the simulator to the Matlab workspace. But I can't find a way to pass the whole Matrix, which is 28x5700.
I could not adapt the examples I have read here (using memcpy), probably I miss some background on this topic.
I have been striving against this for some weeks and any help will be very appreciated.
Thank you
Stefano.
|
|
|
|
|

|
Hi,
Could you give me idea on this errors? I am currently using Matlab 7.5.0(2007b) and Microsoft Visual c++ 6.
Please. thank alot.
c:\documents and settings\administrator\desktop\matlab_add_in\myfunc.h(21) : fatal error C1083: Cannot open include file: 'libmatlb.h': No such file or directory
MyFunc_main.c
c:\documents and settings\administrator\desktop\matlab_add_in\myfunc_main.c(14) : fatal error C1083: Cannot open include file: 'libmatlb.h': No such file or directory
Error executing cl.exe.
Build : warning : failed to (or don't know how to) build 'E:\trabajos\daniel\practicasC++\conv\MyFunc.m'
|
|
|
|

|
I had matlab 7.0 and the mccsavepath command doesn't work anymore, this is because this version of matlab supposedly 'automatically' adds its path to the windows path. this is not necessarily done right and can be corrected manually. See instructions here and add you matlab bin directory to the path, for example on my computer I copied this to my path:
C:\Program Files\MATLAB\R2007a\bin
C:\Program Files\MATLAB\R2007a\bin\win32
also, make sure your visual c++ bin directory is in the same path, on my computer:
C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin
Before I discovered this I reinstalled an older version of matlab that did have a working mccsavepath command, matlab 6.5 (release 13). in matlab 6.5 I typed in the commands as this article shows and they worked ok, but then I still had to go into the windows path and manually make sure that the matlab and vc++ bin directories were in the windows path:
c:\matlab6p5\bin\win32
C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin
|
|
|
|

|
I have the same exact proplem as the following and i have matlab R2007b :
I follow the instruction to
Configure the Matlab Add-in for Visual Studio 6 to work within MSVisual C++:
by Open MSVisualC++, Select Tools -> Customize from the MSVC menu.
Clicking on the Add-ins and Macro Files tab.
but i dont see any MATLAB for Visual Studio on the Add-ins or Macro Files list ,
i also type the command in MAATLAB:
cd(prefdir) ;
save mccpath;
|
|
|
|

|
sir,
I used the example to build an Vc++6.0 application which use matlab function and yhe application run well. my problem is when i execute my application to the another computer i have some errors. how can i generate the executable file of my application?
|
|
|
|

|
this is my first time to come here.I also have the problem that is same as Joel Karbassi .My matlab release is 7.1. I also cannot see the button in MSVC. I'm glad to hear from you and thank you!
|
|
|
|

|
i follow the instruction to
Configure the Matlab Add-in for Visual Studio 6 to work within MSVisual C++:
by Open MSVisualC++, Select Tools -> Customize from the MSVC menu.
Clicking on the Add-ins and Macro Files tab.
but i dont see any MATLAB for Visual Studio on the Add-ins or Macro Files list ,
i also type the command in MAATLAB:
cd(prefdir) ;
save mccpath;
sincerely Joel
|
|
|
|

|
I'm new to MATLAB programming. I currently use MATLAB v6.1(R12) on
MS WINXP SP2 with MS Visual C++ (6.0). I created a section of a
program within the Visual C++ environment and inserted a function
M-file into this program using the MATLAB Visual Studio Add-in. The
function M-file is to produce graphical output based on the values of
arrays which are to be initialized in the C++ environment. The
resulting program shows no compile errors.
The problem begins when the program is executed. It seems unable to
use the arrays intialized within the Visual C++ environment and
returns the error: "variable x is undefined". I don't understand why
this is so as the arrays have been initialized and passed
(mwArray(n_,_n,_name). I would appreciate it if someone could
provide assistance urgently.
Thank you
ATBU
|
|
|
|

|
I'm new to MATLAB programming. I currently use MATLAB v6.1(R12) on
MS WINXP SP2 with MS Visual C++ (6.0). I created a section of a
program within the Visual C++ environment and inserted a function
M-file into this program using the MATLAB Visual Studio Add-in. The
function M-file is to produce graphical output based on the values of
arrays which are to be initialized in the C++ environment. The
resulting program shows no compile errors.
The problem begins when the program is executed. It seems unable to
use the arrays intialized within the Visual C++ environment and
returns the error: "variable x is undefined". I don't understand why
this is so as the arrays have been initialized and passed
(mwArray(n_,_n,_name). I would appreciate it if someone could
provide assistance urgently.
Thank you
ATBU
|
|
|
|

|
On VS2003 I get mbuild -setup and mex- setup to work and can build mex files (from .c/.cpp code and .m code). I did this (in case anyone wants to know) by making a copy of the VC folder in the visual studio .net folder and naming it Vc7 (as this is where matlabs mbuild -setup script looks for the cl.exe compiler).
I could also get the Visulal Studio. However the add-in, that should be made availeble after running the mbuild -setup, is not availeble because the tools-customize dialogue is not the same as in VC++ 6. Also the (copied) Vc7 folder is not accessed by VS2003 .net so, if this is where the add-in is placed it will not be found.
To overcome this I used the MatLab VS.Net Custom App Wizard (see matlab exchange) to allow me to start a mex project using the VS IDE new project wizard. This was fine.
Now I have upgraded to VS2005 and things are not so good.
On VS2005 I can get the mex -setup and mbuild -setup scripts to run successfully (by doing the same copying and calling it trick) but this time the .dlls dont work. Also I have tried the MatLab VS.Net Custom App Wizard and although I can get the wizard to create the project, the project no longer compiles.
If anyone has sorted this out yet please let me know. Also, if your using VS2003 then try my trick of creating the Vc7 folder in the VS.NET2003 folder.
cheers,
lIAmO,
lets help each other make coding easier.
|
|
|
|

|
Hi, my name is Ray, can I help you?
I have a function (piecewise) in matlab's editor
function y = fdp1(x)
if (x < 0)
y=0;
elseif (x >= 0 & x < 1)
y=(1/2)*x.^2;
elseif (x >= 1 & x < 2)
y=1/2;
elseif (x >= 2 & x < 4)
y=(1/4)*x;
else x >= 4
y=1;
end;
______________
When I want to plot,
It's don't plot
Why?
|
|
|
|

|
Hola,en primer lugar te expreso mis saludos y agradecerte pues este tutorial e ha servido mucho.Ahora te quiero hacer una pregunta: lo que yo deseo es leer una funcion en visual c++ usando el add in pero en esta función yo guardo variables como archivos .mat para luego cargarlos con load en otra función y poder trabajar en esa. ¿Cómo puedo trabajar con estos archivos?.Te agradeceré mucho tu ayuda.
Hector Villacorta
|
|
|
|

|
I want to write a Visual C++ program which gets data from the user and gives this data to GAMS (on a simple button click and GAMS should not run visibly). GAMS is then supposed to make a calculation and give the obtained data back to my Visual C++ program so that I can use this new data. Does anybody know if this is possible???? And if so, then how should I do this? THANKSA in advance.
|
|
|
|

|
hi, desparately in need of advise why it doesnt seem to work for me..
I did all the steps as advised and what i did was change the function and import to my vc++ program. I tried a simple .m file ie.
ie. function d=magic(imagefn)
ie. p = imread(imagefn);
ie. imshow(p);
----
where imagefn is a filename string
However, when i tried calling the function mlfMagic(filename) in
VC++, it keeps giving me error ' function does not take 1 parameters'
when indeed my .m requires only an input parameter 'imagefn'.
Can advise me immediately on this issue if u know the answer? Tks in advance!
|
|
|
|

|
Sir,
These are the errors i receive when i build ur project... Pls help!!!
ibmatpm.lib(dblmtrx.o) : warning LNK4044: unrecognized option "alternatename:__imp_??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z=__imp_??6std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z"
; ignored
libmatpm.lib(varargin.o) : warning LNK4044: unrecognized option "alternatename:__imp_??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z=__imp_??6std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z
"; ignored
libmatpm.lib(mcccpp.o) : warning LNK4044: unrecognized option "alternatename:__imp_??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z=__imp_??6std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z";
ignored
libmatpm.lib(init.o) : warning LNK4044: unrecognized option "alternatename:__imp_??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z=__imp_??6std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z"; i
gnored
libmatpm.lib(stdexcpt.o) : warning LNK4044: unrecognized option "alternatename:__imp_??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z=__imp_??6std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z
"; ignored
libmatpm.lib(nsubarry.o) : warning LNK4044: unrecognized option "alternatename:__imp_??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z=__imp_??6std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z
"; ignored
libmatpm.lib(arrayidx.o) : warning LNK4044: unrecognized option "alternatename:__imp_??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z=__imp_??6std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z
"; ignored
libmatpm.lib(matmtxif.o) : warning LNK4044: unrecognized option "alternatename:__imp_??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z=__imp_??6std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z
"; ignored
libmatpm.lib(handler.o) : warning LNK4044: unrecognized option "alternatename:__imp_??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z=__imp_??6std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z"
; ignored
libmatpm.lib(feval.o) : warning LNK4044: unrecognized option "alternatename:__imp_??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z=__imp_??6std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z";
ignored
libmatpm.lib(varargout.o) : warning LNK4044: unrecognized option "alternatename:__imp_??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z=__imp_??6std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@
Z"; ignored
libmatpm.lib(dblmtrx.o) : error LNK2001: unresolved external symbol __ftol2
libmatpm.lib(init.o) : error LNK2001: unresolved external symbol __ftol2
libmatpm.lib(init.o) : error LNK2001: unresolved external symbol "__declspec(dllimport) ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z" (__imp_??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$cha
r_traits@D@std@@@0@AAV10@PBD@Z)
libmatpm.lib(handler.o) : error LNK2001: unresolved external symbol "__declspec(dllimport) ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z" (__imp_??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$
char_traits@D@std@@@0@AAV10@PBD@Z)
libmatpm.lib(nsubarry.o) : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
libmatpm.lib(matmtxif.o) : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
libmatpm.lib(feval.o) : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
libmatpm.lib(handler.o) : error LNK2001: unresolved external symbol "protected: virtual class std::fpos __thiscall std::strstreambuf::seekoff(long,int,int)" (?seekoff@strstreambuf@std@@MAE?AV?$fpos@H@2@JHH@Z)
libmatpm.lib(handler.o) : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
libmatpm.lib(feval.o) : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
conv.exe : fatal error LNK1120: 5 unresolved externals
Error executing link.exe.
Build : warning : failed to (or don't know how to) build 'E:\trabajos\daniel\practicasC++\conv\MyFunc.m'
conv.exe - 11 error(s), 12 warning(s)
Thanks,
Vivek
|
|
|
|

|
Has the Matlab 7.0 function "mccsavepath"? If no, what similar function exists in Matlab 7.0?
|
|
|
|

|
hi, i am working in matlab 7. whenever i build the component an error comes. error description is: An error ocurred while shelling out to mbuild (error code = 1). Unable to build executable. can somebody tell me how to remove the error. This will appear at the end of messages you post to the Code Project
|
|
|
|

|
Hello,
I have a m-file which plots a graph taking inputs from a dat file. So, i have called the m file just as mlfbaffle in the button message handler. The code is
double res[19];
mxArray* out;
out = mlfbaffle();
memcpy(res,mxGetPr(out),19*sizeof(double));
mxDestroyArray(out);
But i get error as
:\work\convu\convudlg.cpp(178) : error C2065: 'mlfbaffle' : undeclared identifier
c:\work\convu\convudlg.cpp(178) : error C2440: '=' : cannot convert from 'int' to 'struct mxArray_tag *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
baffle.c
I have followed the instructions as given in this link but the error persists.. Plz help...
I can run this code in matlab but not using MFC...
function out = baffle()
x1 = load('d:\su_mat\t0');
x2 = load('d:\su_mat\t01');
x3 = load('d:\su_mat\t012');
x4 = load('d:\su_mat\t0123');
x5 = load('d:\su_mat\t01234');
y1 = load('d:\su_mat\f0');
y2 = load('d:\su_mat\f01');
y3 = load('d:\su_mat\f012');
y4 = load('d:\su_mat\f0123');
y5 = load('d:\su_mat\f01234');
r1 = load('d:\su_mat\reflectivity.dat');
%plot(y1,x1,y2,x2)
plot(y1,x1,y2,x2,y3,x3,y4,x4,y5,x5) %CHANGE
grid on;
xlabel(' T/(2*H) ');
ylabel( ' F(r) / F(i) ');
out = sprintf('1')
PLzz help
Regards,
|
|
|
|

|
Dear sir,
I've just started learning how to call a MATLAB funtion from MSVC++.I've tried with a lots of funtions that doesn't require graphics.It goes fine,but I got stuck with the 'plot' function.The program I've written is as follows:
#include "matlab.hpp"
#include "stdafx.h"
#include "libmwsglm.h"
//Add C++ Math Library to project
#pragma comment(lib, "libmatpm.lib")
#pragma comment(lib, "libmx.lib")
#pragma comment(lib, "libmatlb.lib")
#pragma comment(lib, "libmat.lib")
#pragma comment(lib, "libmmfile.lib")
#pragma comment(lib, "libmatpm.lib")
#pragma comment(lib, "sgl.lib")
int main()
{
const double pi = 3.1415926;
const double Fc = 1;
const double T = 1/Fc;
mwArray t(0.0,T/16,T);
mwArray x = cos(2*pi*Fc*t);
x.Print("x");
plot(t,x);
return 0;
}
It gives neither compilation error nor linker error.The vector x is printed ,but after that the program ends with a messege "abnormal program termination" without any figure.
Can you please help me to fix the probelem
Waiting for ur kind reply.
Thanks and regards
Arkadeep Sett
|
|
|
|

|
1) Can i hav a complete code for Matlab 6.5 GUI open file dialog box that is functional.i can't open the selected file from the dialog box?
2) How can i pass the selected file from the dialog box as an argument to a function?thanks.
|
|
|
|

|
Loved the example thanx.
I need an implementation of a matlab function called "decimate", I guess its from the signal processing toolbox , I tried to add
Mydecimate.m to the project like in the example. Lots of files where added to the project by the matlab Add-in, the compilation went very well but during the linking process I got exactly 2450 unresolved externals (and 17 warnings -that made me very happy)
any way...
Am I doing something terribly wrong , I'm newbie in MATLAB and is there a way to know what lib's to link to resolve these errors (or perhaps link them all)
Enlighted people of the world please advise a lost soul .
Thanks a lot!
|
|
|
|

|
I want to do an optimization in GAMS ( a program of optimization). But I want to use an m-file. To do this I consider the use of Visual C++ 6.0. For use a C program from GAMS I have to compile this program with a .bat file (I can't use visual C++ directly). I want to know if posible compile the m-file in such way that I can use that program in other program without use the matlab library. I consider use COM, but I don't know how to use this in a C++ program. In the other hand, I want to know if it's possible to call a .exe program for a c/c++ program.
|
|
|
|

|
this is my function
funtion a=FT1(b)
a=b*2;
funtion c=FT2(d)
e=FT1(d);
c=e*3;
i'm new to VC++,so can you show me clearly,or give me some code.
thank you
dnqhung
|
|
|
|

|
I downloaded the files, and followed steps to install the add-in and build the project and it runs just fine. However, when I press the CONV button the application exits with a code of 1. When I debug the OnConv() this occurs at the mxCreateDoubleMatrix() call ... any ideas what is going on? Thanks!
peter
|
|
|
|

|
Dear Sir,
I'm control engineer student(M.S.).T work with MATLAB alot.
I have good skill in matlab.I live in Iran.I wanna know that can I
use my information to have a acception form othe university.
Best Regards
mustafa samadi
|
|
|
|

|
I have followed each and every step , when I open Myfunc.m file from MSVC after selecting Windows Console Exe .
ERROR Comes: MCC returned error code 1.
I have installed Matlab 6.5 , I don’t know whether Matlab C library is included with it or it is to be installed separately. I am doubtful that it may be the cause for this error.
When I build this application then following error comes:
|
|
|
|

|
i wrote a similar program :
m file : MyFunc.m
===========================
function out=MyFunc(a,b)
if ( a >= b)
out = a;
else
out = b;
end
========
in visual studio :
====================
#include
#include "matlab.h"
#include "MyFunc.h"
int main(void)
{
double aa = 2;
double bb = 5;
double outout;
mxArray *a;
mxArray *b;
mxArray *out;
a = mxCreateDoubleMatrix(1,1,mxREAL);
b = mxCreateDoubleMatrix(1,1,mxREAL);
memcpy(mxGetPr(a),aa,1*sizeof(double));
memcpy(mxGetPr(b),bb,1*sizeof(double));
out = mlfMyFunc(a,b);
memcpy(outout,mxGetPr(out),1*sizeof(double));
mxDestroyArray(out);
mxDestroyArray(a);
mxDestroyArray(b);
printf("The bigger of 2 and 5 is %f",outout);
return 0;
}
=====================
but i got the following error:
=====================
-------------------Configuration: humm - Win32 Debug--------------------
Compiling...
main.cpp
C:\FIRSTAPP\humm\main.cpp(19) : error C2664: 'memcpy' : cannot convert parameter 2 from 'double' to 'const void *'
There is no context in which this conversion is possible
C:\FIRSTAPP\humm\main.cpp(20) : error C2664: 'memcpy' : cannot convert parameter 2 from 'double' to 'const void *'
There is no context in which this conversion is possible
C:\FIRSTAPP\humm\main.cpp(22) : error C2065: 'mlfMyFunc' : undeclared identifier
C:\FIRSTAPP\humm\main.cpp(22) : error C2440: '=' : cannot convert from 'int' to 'struct mxArray_tag *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
C:\FIRSTAPP\humm\main.cpp(24) : error C2664: 'memcpy' : cannot convert parameter 1 from 'double' to 'void *'
There is no context in which this conversion is possible
Error executing cl.exe.
main.obj - 5 error(s), 0 warning(s)
========================
please help....
awhanpatnaik@rediffmail.com
|
|
|
|

|
I have followed each and every step , when I open Myfunc.m file from MSVC after selecting Windows Console Exe .
ERROR Comes: MCC returned error code 1.
I have installed Matlab 6.5 , I don’t know whether Matlab C library is included with it or it is to be installed separately. I am doubtful that it may be the cause for this error.
Please help me.
Thanks a lot .
M.Adil Hayat Khan
|
|
|
|

|
I have the little toolbar addin in VC++,and the M-file which runs from the Matlab "engine" in my debug directory.All was peachy till I tried to make a
shared dll,the mcc compiler crashed in my face.There has been no activity on this thread hope some1 takes a look soon.
|
|
|
|

|
Dear sir,
I read your replying in www.codeproject.com."Using MatLab Add-in for MS Visual Studio 6".I' m working with Matlab and convert m file to c++ file.I want to use c++ file to implement with MFC application.I don't know how I implement. I want to ask u how I bring matlab file(compile to c++) to implement with VC++ or u can show me some example to do that.For my application,I want to pass picture file name from VC++ to matlab c++ file and matlab process it and matlab pass picture that change to show in VC++.
Yours sincerely,
kritsadakorn K.
|
|
|
|

|
Dear Sir,
i wrote small m fucntion like this
function Out=RectLow()
w=boxcar(10+1);
pi=3.145678;
b = fir1(10,0.5/pi,w);
this is perfectly running in matlab editor but when i include this in vc++ project and collecting output in Mxarry it's not giving anyout piut.
i wasted full 3 hours time.many ways i tried.but i didn't find why it happend like that.
could u pls suggest me the solution
in vc++ after executing the memory address of b is always 0X0000000
why
thank u in advance
regards
usha
|
|
|
|

|
sir,
instead of matlab i used ellip and ellipord functions but it's not throwing any error compiling and not giving any result.
this is my m file
function out=MyEllipHigh(wp_n,ws_n,Atp_db,Ats_db,In1)
[n,wc_n]=ellipord(wp_n,ws_n,Atp_db,Ats_db);
[b1,a1]=ellip(n,wc_n,'high');
out= FILTER(b1,a1,In1);
here all input argumets are mxArry* and i checked it input are coming correctly when i kept breaking point at m file fucntion calling compiler just executing that state ment and coming out from debug mode with out giving output.
could u pls explain me why
regards
|
|
|
|

|
sir
when iam using matlab
in vc++ it is throwing this error
iam new to matlab so i am unable to find why this error is coming
when i compile it is giving this
Performing Custom Build Step on "e:\matlab6p5\toolbox\signal\signal\cheb2ap.m"
Error: "codege" is not a valid -T option argument.
Error executing c:\winnt\system32\cmd.exe.
MyDigFil.exe - 1 error(s), 0 warning(s)
kindly suggest me solution
have anice day
|
|
|
|

|
sir
i am using small filter functions
iam using u r input array as input and m file is like this
function out=MyFunc(In1)
h1=fir1(6,0.5,boxcar(7));
out=filter(h1,1,In1);
this fucntion sucessfully ruuning in matlab cmd but when i use with my mfc class just as u said in article but it's not giving any out put.
thank u very much,
have anice day
|
|
|
|

|
I used function butter and it has 2 output arrays.
[B,A] = Butter(Wp,Ws,Rp,Rs)
How can I get both of them as my output in MSVC because when I followed your step it allow only 1 output array.
|
|
|
|

|
sir could u pls explain me how to use butterord and butter functions of matlab in vc++
iam very thankful providing such nice article
regards
yendluri
|
|
|
|

|
Does it require to be run in Matlab environment? Can I make it to be stand-alone application without Matlab on my PC?
|
|
|
|

|
I've tried the example above but i faced the problem, mlf MyFunc is said to be an undeclared identifier. Did I missed something? Please Help
Thanks
|
|
|
|

|
Dear Cambalindo!
Can you help me with this problem concerning using matlab graphics in Visual C++?
You have talked about this below.
My task is to plot 3d data in Visual C++ project. The data is taken from calculations using Matlab C API. How can I plot 3d charts?
I see two ways to solve this problem:
1) ActiveX controls: i cannot find appropriate activeX's that build good 3d charts (like surf in matlab).
2) Matlab Graphics: this doesn't work. I can create working vc++ project using matlab wizard in VC++ but i cant insert functions from there to my project.
If I use C++ (matlab.hpp) I see a number of linker errors such as
"error LNK2001: unresolved external symbol "public: __thiscall mwLibraryInitBuiltins::mwLibraryInitBuiltins(void)" (??0mwLibraryInitBuiltins@@QAE@XZ)"
If I use C (matlab.h) the project compiles and links, but the window with the plot doesn't appear and the application closes.
So, can you help in this situation?
What should I do?
May be, you have simple VC++ project, that uses matlab graphics and you can send it to me on atrus@rambler.ru.
|
|
|
|

|
I've done follow your step but there's no check box for MATLAB in Add-ins and Macro Files list, there are only 'Visio' and 'samples'. How do i get it work? Could you please give me more detail?
Thanks
|
|
|
|

|
Hello,
I'm trying to import a very simple m-file containing only the imread function in my MFC program...
that's:
function[IMAGE] = getIm(value)
a = value;
IMAGE = imread('C:\image.jpg');
but each time i click on the button that's supposed to call that function the interface disapears and nothing is done...
I've selected handle-graphics when importing the m-file, and i cannot find the solution... can someone help me?
thanks
|
|
|
|

|
Hello,
I have a matlab image processing project (10 .m files) that i want to import on my MFC application... before doing that i was asking myself some question:
1-should i add all my matlab project file or is importing just the main one (that calls the others) sufficient?
2-should i have to choose Use Image Handle Librairy since i' don't want to display any image but just returning a vector containing some image-features that i have computed.
3-Is there something i should know or do when importing the image toolbox in my MFC?
|
|
|
|

|
Hi!
The code I've downloaded is compiled fine, but when I create a new project and try to execute it the linker does not find libmmfile.lib. The specific file exists in the /extern directory of matlab.
Any solutions?
Theodore, Greece
|
|
|
|

|
Hi!
I can build and run the project, but I don't see the convolution. I'm trying with the ZIP file. When I open the workspace, a message tells me the Active X control '3A2B370C-BA0A-11D1-B137-0000F8753F5D' is not registered, that I should register it and try again. What can I do?
Thanks, Christian
|
|
|
|

|
I have written a c++ program with matlab add-in. But it is extremely slow when I run it.
Is there anything wrong?
|
|
|
|

|
When I add the .m file using the toolbar button, I get the error listed below.
This is the output from running MATLAB Add-in.
Please close this window after viewing it.
--------------MCC/MEX BEGIN---------------
mcc -k "C:\MyData\conv\mcc.mak" -/n -t -T link:lib -L C -W libhg:conv -A line:on -g libmmfile.mlib libmwsglm.mlib -vh "C:\MyData\conv\MyFunc.m"
Compiler version: 3.0
Parsing file "c:\mydata\conv\myfunc.m"
(Referenced from: "Compiler Command Line").
Generating file "myfunc.h".
Generating file "myfunc.c".
Generating file "conv.c".
Generating file "conv.h".
Generating file "conv.exports".
Generating file "conv.mlib".
Executing command: mbuild -g -v -output "conv" "myfunc.c" "conv.c" -link shared "conv.exports" -k "C:\MyData\conv\mcc.mak" -no_mwsglm -no_setup
Can't locate mexsetup.pm in @INC (@INC contains: C:\MATLAB6p5/sys/perl/win32/lib C:\MATLAB6p5/sys/perl/win32/site/lib C:/Apps/MATLAB6p5/sys/perl/win32/lib C:/Apps/MATLAB6p5/sys/perl/win32/site/lib . C:\MATLAB6p5/bin/win32) at C:\Apps\matlab6p5\bin\win32/mex.pl line 68.
BEGIN failed--compilation aborted at C:\Apps\matlab6p5\bin\win32/mex.pl line 68.
The system cannot find the path specified.
Error: An error occurred while shelling out to mbuild (error code = 1).
Unable to build executable.
--------------MCC/MEX DONE----------------
I think the problem is that mexsetup.pm is in C:\Apps\MATLAB6p5\bin\win32. The path shown is missing the "apps" part plus it's intermixing forward slashes and backward slashes. How can I change the path where it's searching for mexsetup.pm?
|
|
|
|

|
I could build the project, but the convolution plot is not coming
What to do . please reply immediately
|
|
|
|

|
Hey Mate,
I've been trying to get my dll to run on a computer server, which does not have matlab or MSVS 6.0 installed. I used the packager and created a self-extracting .exe application for my Windows Console EXE dll.I've copied my mgl_runtime_dir\bin\win32 directory into my system PATH directory. I am using Windows 2000 Advanced server operating system. I really can’t understand why this doesn't work. I'm absolutely sure that it has to be related to the PATH directories not accessing Matlab's runtime
directories.
I have the dll working perfectly on the machine that it was developed on, which obviously has Matlab and Visual Studio installed. If I remove the "c:\matlab6p5\bin\win32" path from the system PATH I receive the exact same error messages as my server machine. My development computer uses Windows 2000. Could this be a problem related to Windows 2000 Advanced Server?
Hope your doing well mate, thanks again for all your help.
Cheers
R.K.
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
How to Use the MatLab Add-in for MSVC++ 6
| Type | Article |
| Licence | CPOL |
| First Posted | 24 May 2003 |
| Views | 192,799 |
| Bookmarked | 49 times |
|
|