Creating Structures in MEX files

Started by decious99 in Matlab DSP15 years ago 1 reply

I am working on creating a MEX file that will read data out of a ASCII text file and place its contents into a structure. Anyone ...

I am working on creating a MEX file that will read data out of a ASCII text file and place its contents into a structure. Anyone have an idea how to create a structure that can be passed back as a matlab variable? thanks


problem with 'mex'

Started by Zahra A Shah in Matlab DSP13 years ago

hi, i am trying to use a free toolbox which implements Support vector machines in MATLAB. Now i have to use this toolbox and cannot use some...

hi, i am trying to use a free toolbox which implements Support vector machines in MATLAB. Now i have to use this toolbox and cannot use some other toolbox due to some constraints. The problem which i am having is that, this toolbox is using some C/C++ files (for efficiency). The toolbox has very little documentation and only says that use 'mex' to compile the C/C++ files on your machine. When i...


Re: How to call C program from Matlab?

Started by chri...@gmail.com in Matlab DSP13 years ago

> > > > Hello :), > > I did some mex programming and some digital image > processing implementation for my final year...

> > > > Hello :), > > I did some mex programming and some digital image > processing implementation for my final year project. > Attached is the report I have compiled from my final > year thesis and hope this will help you to understand > mex-programming better. > > Best regard, > Matthew Tan > > --- Tan Thiam Huat wrote: > > Hi All, > > > > I have a


problem in C-MEX S-Function

Started by Nihal Ahmad in Matlab DSP17 years ago

Hi all, I have one problem in C-MEX S-Function, which is as follows In my c-program I have one function named try_info(&bs,...

Hi all, I have one problem in C-MEX S-Function, which is as follows In my c-program I have one function named try_info(&bs, &fr_ps), which I want to call in mdlOutputs( ). where bs and fr_ps are the structures, which I am passing as an input arguments. stru


C MEX S-function embedding in a TI DSP target

Started by lee_xmen in Matlab DSP15 years ago

Hi , If i've written a C-Mex S function ,can i embed it on a TI DSP target??,,or its possible to embed only inbuilt...

Hi , If i've written a C-Mex S function ,can i embed it on a TI DSP target??,,or its possible to embed only inbuilt simulink blocksets on a TI DSP target..please let me know as soon as possible Thanks, mittu


C mex problem .. .help required urgently

Started by ahma...@yahoo.com in Matlab DSP13 years ago 1 reply

Hello everyone, The problem which I am facing is that I've wrote a simple convolution program in C and put it in the mex file. It worked fine...

Hello everyone, The problem which I am facing is that I've wrote a simple convolution program in C and put it in the mex file. It worked fine when I gave the input a simple matrix of 12X12, But when I give in an image as an input, it gives me error .... The program and the error is attached for clarity ...... An early reply from anyone would really be appreciated . Regards Ahmad %%%%%%%%%%...


Is there way to use external intefaces in Matlab

Started by ramineni_bsp in Matlab DSP16 years ago

hello friends, I am trying to Use OpenCV library in matlab .I worked on mex files and I know its possible to interface c...

hello friends, I am trying to Use OpenCV library in matlab .I worked on mex files and I know its possible to interface c files in matlab.Now I want to know is there way to interface external libraries like OpenCV in Matlab using mex files .Any suggestion will be


Info GUI/mex

Started by Giovanni Marino in Matlab DSP14 years ago

Hi, I have a problems with matlab. I have a Gui and I would "translate" it in C/C++. I tried to use mex but I have this error message...

Hi, I have a problems with matlab. I have a Gui and I would "translate" it in C/C++. I tried to use mex but I have this error message from linker: "prova_hello.obj LINK : error LNK2001: unresolved external symbol mexFunction _lib3151.x : fatal error LNK1120: 1 unresolved externals LINK : fatal error LNK1141: failure during build of e


Does Matlab Mex file completely support C++ class?

Started by andey in Matlab DSP17 years ago

I tested a simple C++ Mex file which is: #include #include void timestwo(double y[], double x[]) { ofstream File;...

I tested a simple C++ Mex file which is: #include #include void timestwo(double y[], double x[]) { ofstream File; File.open("test.str",ios::out); File << " TEST is OK " <&l


m file to dll

Started by umar khan in Matlab DSP13 years ago

hi, does any one know how to convert an m file to dll? I have already tried the mcc command. It generates a dll but when I run it matlab...

hi, does any one know how to convert an m file to dll? I have already tried the mcc command. It generates a dll but when I run it matlab complains that it found no mex function in it. Any ideas? Regards, Umar.


c function for rtw

Started by Hany Ferdinando in Matlab DSP19 years ago 1 reply

dear all, I would like to use several function in c for RTW, e.g. ssSetInputPortDirectFeedThrough. But I cannot compile it with...

dear all, I would like to use several function in c for RTW, e.g. ssSetInputPortDirectFeedThrough. But I cannot compile it with mex. Does anyone have idea for this problems? I would like to access hardware from simulink. I need information about how to build the s


mex problems

Started by sp1_...@yahoo.com in Matlab DSP14 years ago

I have some problems using c-code in Matlab. I'm trying to implement a lot of filterbank on some pictures (352*288 matrix of doubles),...

I have some problems using c-code in Matlab. I'm trying to implement a lot of filterbank on some pictures (352*288 matrix of doubles), where the filterbank is written in c. I have the following questions: 1. How can I use the mxPrintf to print some of the elements after using the mxGetPr-command? When using this I get a *double, but my c-skills are rather poor.


MATLAB S FUNCTION

Started by Anonymous in Matlab DSP18 years ago

Hello All, I have a number of C code S functions that were created in a different version of Matlab. It does compile in MATLAB...

Hello All, I have a number of C code S functions that were created in a different version of Matlab. It does compile in MATLAB 5 and 6 . But the simulink block does not run . It gives: invalid mex file. Can anyone help me with this ..how to make it work. I guess the files


can't open m files in VC++

Started by Nayan in Matlab DSP17 years ago

hi all, > > i get the following error while adding m files to my VC++ project > > This is the output from running Visual...

hi all, > > i get the following error while adding m files to my VC++ project > > This is the output from running Visual MATLAB. > Please close this window after viewing it. > --------------MCC/MEX BEGIN--------------- > mcc -k "E:\programs


about S-Function

Started by Simon Christian - 23496013 in Matlab DSP19 years ago

Dear All, I'd like to make a system with S-Functions. But I've a problem to fill the parameter in dialog box S-Function. Does...

Dear All, I'd like to make a system with S-Functions. But I've a problem to fill the parameter in dialog box S-Function. Does anybody have a idea for this ? And I don't know to definition parameter in the S-Function using C-MEX. Where I must define that ? Does anybody k


How to call C program from Matlab?

Started by Tan Thiam Huat in Matlab DSP18 years ago 1 reply

Hi All, I have a simple C program (io.c) for I/O functions. How do I call the C program from Matlab. I understand there is a...

Hi All, I have a simple C program (io.c) for I/O functions. How do I call the C program from Matlab. I understand there is a mex function to do that. But there is still a lot of technical details which I am quite confused, example the mxArray, etc. could anyone help?


Mex Error on Solaris

Started by Drabot, Slawek in Matlab DSP18 years ago 1 reply

Hi again, I noticed that the error I was getting was consistent between using both the Gnu Fortran and Sun C compilers and...

Hi again, I noticed that the error I was getting was consistent between using both the Gnu Fortran and Sun C compilers and consists of: symbol s_rsue: referenced symbol not found Any help identifying the problem causing this error would be appreciated.


mexfunction matlab fortran

Started by jaber elhadad in Matlab DSP17 years ago

> > Hi all > > > > I am trying to Call a mex files Fortran Program from Matlab Program >and I > > have a Matrix output and...

> > Hi all > > > > I am trying to Call a mex files Fortran Program from Matlab Program >and I > > have a Matrix output and some scalar input , but when I execute the >Program > > I have a Segmentation Violation Error . >


Passing parameters in C-mex

Started by Szakacs Tamas in Matlab DSP13 years ago

Hi, Here is an other s-function question. I have a s-function for animation purpose. It has no output, only inputs snd drasw lines. It...

Hi, Here is an other s-function question. I have a s-function for animation purpose. It has no output, only inputs snd drasw lines. It makes a lot of coordinate-rotations, and has also loop. For speeding the simlulation up I thought I would compile it to c. I have two problems: One is that starting the simulation an error message inform that the output must be a real vector of 0 eleme...


Fortran compiler

Started by Anonymous in Matlab DSP16 years ago

Hello Kailash Suppose that I have the C routine bellow. This routine calculate the factorial of n. Suppose that you dont...

Hello Kailash Suppose that I have the C routine bellow. This routine calculate the factorial of n. Suppose that you dont want translate this routine for Matlab function or script. So you can use the mex command. In the Matlab prompt you type (or you