On 5/23/2012 3:09 AM, Fatiha wrote: > Hi, > My question is it possible to convert matlab code to C++? If yes, > how we can convert matlab code and files to C++? > Thank you very much. matlab coder http://www.mathworks.com/products/matlab-coder/

0 |

5/23/2012 8:10:44 AM

undefined ...

hello, can anyone tell me how to connect between matlab and c#? is it using COM? or how? and it is done in c# or matlab or both? can anybody help me pls Thanx, Victor Search for "c sharp" on the MathWorks support page. Stuart "victor hugo" <dvictor_hugo@yahoo.com> wrote in message news:eee4ca3.-1@webx.raydaftYaTP... > hello, > > can anyone tell me how to connect between matlab and c#? is it using > COM? or how? and it is done in c# or matlab or both? > > can anybody help me pls > > Thanx, > > Victor ...

US-MA-Natick: Developer, C++, C, XML, Java, MATLAB, Simulink, CAD tools; C-P (45307257608) ========================================================================================== Position: Developer Reference: SMC01487 Location: Natick MA Duration: C-P Skills: 3+yrs of software engineering with strong C++, C, XML, and Java programming skills. Experience with MATLAB and Simulink. Knowledge in simulation algorithms and engineering systems. Experience with engineering simulation and CAD tools Please send your current resume in confidence to <staffing@eurosoft-inc.com> ..45307257608. ...

Hello, Anyone know where I might find this? Michael. Hi Michael Simon Haykins Book "Adaptive Filter Theory" comes with qrdrls matlab code on the CD. regards alain M. Wirtzfeld wrote: > Hello, > > Anyone know where I might find this? > > > Michael. > > ...

Hello, Anyone know where I might find this? Michael. ...

If i have: //option 1 - it doesn't work float *nou; nou = (float *) calloc(50, sizeof(float)); //option 2 - it works float nou[15]; How can I send "nou" to Matlab if it's a pointer (option 1)??? - option 2 works with the code: I'm using this code: mxArray *TxNou = NULL; TxNou = mxCreateNumericMatrix(1, 15, mxSINGLE_CLASS, mxREAL); memcpy((void *)mxGetPr(TxNou), (void *)nou, sizeof(nou)); matlab.PutVariable("TxNou", TxNou); matlab.EvalString("plot(TxNou);"); I don't know what changes I have to do in the code - i've tried a lot of things... i don't find the error! Thanks for your advice, Oscar Oscar Esteve wrote: > If i have: > //option 1 - it doesn't work > float *nou; > nou = (float *) calloc(50, sizeof(float)); > //option 2 - it works > float nou[15]; > > How can I send "nou" to Matlab if it's a pointer (option 1)??? - > option 2 works with the code: > > I'm using this code: > mxArray *TxNou = NULL; > TxNou = mxCreateNumericMatrix(1, 15, mxSINGLE_CLASS, mxREAL); > memcpy((void *)mxGetPr(TxNou), (void *)nou, sizeof(nou)); Why not use mxGetData and avoid the cast? in option 1: sizeof(nou) = sizeof(float *) = 4 on 32 bit, 8 on 64bit. In option 2: sizeof(nou) = 15*sizeof(float) = 15*4 = 60 > matlab.PutVariable("TxNou", TxNou); > matlab.EvalString("plot(TxNou);"); > > I don'...

Many of you who post to this newsgroup are also regular contributors to the MATLAB Central File Exchange. Look for your favorite contributors on our File Exchange Author Profile page. You can read their profiles and see pictures: <http://www.mathworks.com/matlabcentral/reports/fileexchange/allProfiles/> In a random drawing, we recently awarded MATLAB jackets to three File Exchange authors with profile pages: Michele Giugliano, Andrey Egin, and Denis Gilbert. You can win a jacket, too. Just submit a new file to the File Exchange or update your author profile by December 2003 for a chance to win one of four MATLAB jackets. See the jacket below: <http://www.mathworks.com/matlabcentral/images/jeff3.jpg> Here are some interesting File Exchange facts: - Since its inception in 2001, visitors have downloaded more than 1.25 million submissions from the File Exchange. - In September 2003 alone, visitors downloaded 80,085 files, an average of 2670 a day! .... what if the prize was a free copy of the next version of Matlab :-) majb Min Poh wrote: ....or an offer for employment... aj "bourassa" <bourassa-m@rmc.ca> wrote in message news:3f9d507d$1@rmcnt03a.rmc.ca... > ... what if the prize was a free copy of the next version of Matlab :-) > > majb > > Min Poh wrote: > ...

I am trying to to some computations and I would like to do it in parallel using parfor or by Opening the matlabpool.. as the current implementations is too slow: result=zeros(25,16000); for i = 1:length(vector1) % length is 25 for j = 1:length(vector2) % length is 16000 temp1 = vector1(i); temp2 = vector2(j); t1 = load(matfiles1(temp1).name) %load image1 from matfile1 t2 = load(matfiles2(temp2).name) % load image2 from matfile2 result(i,j)=t1.*t2 end end It work fine but I would really like to know if there is a way to speed thing up ... Thanks a lot in advance! ...

dear all! Plz help me out that how can i implement Matlab code in LABVIEW.i am using matlab 7.0 and LABVIEW 7.1. is there any method so that i dont have to change the Matlab code and it runs in LABVIEW. secondly can i run a C++ code in formula node exactly as it runs in C++ compiler thnx for ur time Manzoor manzoor, In version 7 and 7.1, LabVIEW have the "MATLAB Script Node" that allows you to run m-scripts from within LabVIEW. Since you have communication between both products, minimal change (if any) is necessary, but you have to have both produts installed on the same machine for this interface to work. In LabVIEW 8.20, NI introduced the Mathscript node and this requirement is not necessary. Please look into this site: <a href="http://www.ni.com/labview/mathscript.htm" target="_blank">http://www.ni.com/labview/mathscript.htm</a> to learn more about mathscript node. In the formula node, you can use C-like convension to develop your equations. However, you can't use object-oriented programming in there. So, you need to remove the objects from the formula and use stricted types. You should be able to obtain more information in the help of the Formula Node. Hope this helps. ...

US-TX-Austin: Signal Processing Eng., C/C++, Matlab, Verilog, algorithm devel.; (45345932412) ============================================================================================= Position: Signal Processing Eng. Reference: SMC01894 Location: Austin TX Duration: Perm Skills: 6 years of total industry experience or greater An in-depth knowledge of signal processing algorithm development A solid understanding of C/C++ and Matlab A solid understanding of Verilog or similar language Prior experience in a communications or related IC development environment Knowledgeable with standard IC design tool flows Wireless LAN or OFDM algorithm experience Excellent communication skills Scope: Signal processing design engineer. Activities include algorithm development and implementation in both RTL and firmware for wireless communications ASICs. Responsibilities: Actively participating in the definition and implementation of communication ASICs Algorithm design Implementation and debug Methodology definition Please send your current resume in confidence to <staffing@eurosoft-inc.com> ..45345932412. ...

Hello everyone, I have a matlab in class exercise due in few days. I am new to matlab and the instructions provided with the assignment is minimal. Can Someone help me with the basic understanding as in how can I map the problem's solution to matlab script ? I am not able to post question here as it is a jpeg file. Please let me know and then we can discuss further. ...

My problem with matlab script node is related to calling function in matlab. I created an m-file function that takes an imput temperature (from DAQ) and defines a material property. My matlab script node doesn't seem to recognize my function. I have placed the function in the folder the vi is currently located, but it doesn't read it. How do I get matlab script node to read the functions I create in matlab? Add the directory to matlab path, or call the .m file with it full name ( D:\..... \myfile.m) Let me clarify, I have pasted my matlab code into the matlab scrip node. In this code, I have called a subfunction that I have created. Example k(n)=k_c(T(n)) where k_c is a subfunction I have created. How do I get my code in the node to sucessfully read the subfunction k_c? As indicated, you need to add the directory where the .m file containing the function resides to the list of paths that are read in. This is your startup.m file. The other option is to do a "cd" command prior to calling your function to change to the directory where the .m file containing the function resides. Thanks for reiterating the information. My matlab script node is working properly. I had never used the "cd" command in matlab. I always set the working directory when I open the program, and put all the m files into t...

Does anyone now where I can found example code on how to use dll objects (created in Matlab) in .NET Visual C# Jakes Windell wrote: > > > Does anyone now where I can found example code on how to use dll > objects (created in Matlab) in .NET Visual C# <http://www.codeproject.com/dotnet/matlabeng.asp> read the part about "access with dll" Below is an example that works for calling a MATLAB Compiler 4.0 (R14) generated DLL from C#... Copy the following code and save it as timestwo.m: function y = timestwo(x) y = 2*x; H=plot(y*[1:10]); waitfor(H); This function multiples the input by two and then displays a line plot. Now execute "mbuild -setup" and select your Microsoft compiler. Generate the shared library by executing: mcc -B csharedlib:libtimestwo timestwo.m Note that, in order to call the generated DLL, the DLL must reside either in the same directory as your executable or in a directory on your system path. For help in how to modify the system path, see: http://www.mathworks.com/support/solutions/data/1-15ZLK.html?1-15ZLK Also, if you move the generated DLL to another directory, be sure to also move the associated CTF-file to the same directory. Open Microsoft Visual Studio .NET. Select File->New->Project. Then select Visual C# Applications in the left pane and Console Application in the right pane. Click OK and some automatically generated code will appear. Replace this code with: using System; using Syst...

Previously, much of the reason I use matlab is because of its graphics capabilities. The microsoft visual studio and C# (GDI+ in particular) language change the situation gradually. I spent a lot of time try to take advantage of both and tried very hard to combine them together using Matlab's COM builder. Eventually, I give up. After undersdanding more about C# framework, I found that C# and GDI+ provide tools I need to create any type of graphics and charts very easily. The DataGridView combinining with GDI+'s graphics capability applow me to create spreadsheet-like application, which is very hard to be achieved using matlab. In particular, after reading two useful books "Professional C# - Graphics with GDI+" (for brief discusion, see for xample: <http://www.codeproject.com/books/1861004990.asp)> nd "C# CHarts and Graphics" (see sample chapters from publishing.unicadinc.com), now i can create any kind of matlab chart or graphics using C#. and have much more flexibility than using matlab. Now I switch to C# total and don't want to touch matlab anymore (even though i have used matlab for many years). I don't see matlab's future. Mike <sf_mike01@yahoo.com> wrote in news:ef52d21.-1 @webcrossing.raydaftYaTP: > Previously, much of the reason I use matlab is because of its > graphics capabilities. The microsoft visual studio and C# (GDI+ in > particular) language change the situation gradually. I spent a lot of > t...

Hi all, I'm building a java swing based GUI for my Matlab application. As such, user input is available as text strings, for example "{[0; 0], [3.5 0; 0 2]}" (mean vector and covariance matrix of a 2D Gaussian). The user input will be passed to the compiled matlab method as a MWCellArray. Problem is how do a convert (parse) the above string into a MWCellArray? From its javadoc http://www.mathworks.com/access/helpdesk/help/toolbox/javabuilder/MWArrayAPI/index.html the following method is available: java.lang.String toString() Returns a string representation of this array, but the reverse method is not. Evidently, parsing a string like the one above is a non trivial task and I'm loath to attempt writing one by myself. I would be very thankful if someone can point me to the required parser implementation. Matlab itself is carrying out this task all the time, perhaps it is possible to access Matlab's own parser. Help much appreciated, Ritesh ...

Has anybody managed to connect to the Matlab COM interface directly from C++? Not just the "Matlab Engine", which can't be opened in "desktop" mode with full debugging. I need the debugging features and it appears the only way to get them is to go directly in through the COM interface. If so, can I get a copy of the relevant code that connects, shoves data to and fro, and executes a command? Thanks in advance. Additionally, has anybody managed to dump out the routines and calling sequences available through the COM interface? That would be a good start. -- James A. (Andy) Moorer www.jamminpower.com Adobe Systems, Incorporated On Thu, 02 Oct 2008 01:11:22 GMT, "James A. \(Andy\) Moorer" <jamminpower@earthlink.net> wrote: >Has anybody managed to connect to the Matlab COM interface directly from >C++? Not just the "Matlab Engine", which can't be opened in "desktop" mode >with full debugging. I need the debugging features and it appears the only >way to get them is to go directly in through the COM interface. > >If so, can I get a copy of the relevant code that connects, shoves data to >and fro, and executes a command? Thanks in advance. > >Additionally, has anybody managed to dump out the routines and calling >sequences available through the COM interface? That would be a good start. It's been a while (as in Matlab 6.5.1) but I have connected C++ code to Matlab us...

Hi all of you! So my question is can somebody help me to convert a .bmp file into .mat file. Cause I need to use a certain picture like a input in MatLab. Hi Irina Look at online documentaion of IMREAD for *.bmp file. You will be abble to store your bmp image from disk file in a matrix and save it in workspace. C.Ret "Irina" <karaira@ABV.BG> wrote in news:26117424.1148664100808.JavaMail.jakarta@nitrogen.mathforum.org... > Hi all of you! > > > So my question is can somebody help me to convert a .bmp file into .mat file. Cause I need to use a certain picture like a input in MatLab. ...

-------- Original Message -------- Date: 12 Sep 2003 23:52:45 GMT Newsgroups: comp.lang.verilog Hello, My university has NC-verilog from cadence. I've used it mostly from the command-line, in much the same way I used verilog-XL. I have also used matlab/c++ (with the standard template library, STL) to explore some CAD algorithms. Matlab is the top-most environment. It calls my C++ program, which was compiled in a very specifical way (described in the matlab documentation) to be called as a dynamic library. My C++ program does call-backs to the parent matlab environment for some things. Some matlab files are also used in the compilation process. I've come to a phase in my thesis where I have to combine matlab, C++/STL, and nc-verilog. The C++ code must evaluate a great number of verilog designs by repeatedly invoking simulations. Hopefully, I can do this by keeping the simulation engine running and simply resubmitting various verilog files. Only certain parameter definitions will change between the various simulations. Hopefully, I can avoid recompiling. Ideally, I can extract output data from certain nodes without having to write to a file. My understanding is that API work can be very cumbersome and messy. A colleague suggested looking at SystemC. He has some experience with Verilog's PLI, but advises against going that route. So I will start checking out the SystemC website. I wonder if more experienced people than I can give me a heads up on...

In MatLab 6.5, the routine above works normal: figure; sem=Average(:,2)./sqrt(Average(:,3)); bar([1:1:7],Average(:,1),sem); ylabel('% of epochs analyzed') xlabel('Frequency Band') title ('Occurrence of Oscillatory Events - Ch X') %Where Average and sem are vectors; But, in MatLab 7.0, the same code cause the following error: ??? Error using ==> xychk Too many input arguments. Error in ==> bar at 53 [msg,x,y] = xychk(args{1:nargs},'plot'); Error in ==> cross_subj_analysis>ok_Callback at 327 bar([1:1:7],Average(:,1),sem); I'd like to know why this occour. Thanks Henrique In article <g7a1j6$l1$1@fred.mathworks.com>, Henrique Amaral <henriquetomaz@uol.com.br> wrote: >In MatLab 6.5, the routine above works normal: >figure; >sem=Average(:,2)./sqrt(Average(:,3)); >bar([1:1:7],Average(:,1),sem); >ylabel('% of epochs analyzed') >xlabel('Frequency Band') >title ('Occurrence of Oscillatory Events - Ch X') >%Where Average and sem are vectors; >But, in MatLab 7.0, the same code cause the following error: >??? Error using ==> xychk >Too many input arguments. >Error in ==> bar at 53 > [msg,x,y] = xychk(args{1:nargs},'plot'); >Error in ==> cross_subj_analysis>ok_Callback at 327 >bar([1:1:7],Average(:,1),sem); >I'd like to know why this occour. When the third argument is numeric, it must be the bar width. barwidth must b...

Hi! I opened the matlab script fractal.vi then my antivirus (Kaspersky) ask if I acept the modified te registry of matlab setup, I say "yes" After that when I want open matlab the setup run but inmediatly it's close, why???? Hola: Abri el matlab script fractal.vi y mi antivirus (Kasoersky)me preguntaba si aceptaba una modificacion del registro del setup de matlab yo acepte Despues de eso cuanto abro matlab se cierra inmediatamente porque?? Hola Sa�l Es probable que el problema est� relacionado con el antivirus Kaspersky, trata de deshabilitarlo y correr nuevamente el ejemplo. Si esto no funciona revisa el estado de tus licencias de LabVIEW y de Matlab, probablemente tengas que reinstalar el programa y/o activar las licencias. �Qu� versi�n de LabVIEW y Matlab tienes? �El comportamiento es el mismo con el otro ejemplo?, me refiero al de la siguiente dir: labview\examples\scriptnode\Differential Equation.llb\MATLAB Script - Lorenz Diff Eq.vi Si corres este ejemplo �El antivirus tambi�n te pregunta cambiar lo de los registros?, ser�a bueno contactar a Mathworks para saber c�mo reconfigurar nuevamente los registros de Matlab ...

I have used MATLAB for few hours.So I don't know the differences between version 6.5 and 7.0.I want to use some codes of MATLAB 7.0, but they doesn't work in MATLAB 6.5.How to change these codes so that they can work in matlab 6.5.Waiting for your help. Thank you . The codes are like this .I think changing the function findPI may work ,but I don'y know how % PIfun.m % Evaluate a function used to find the PI-line, using Kyle Champley's % method. % % Adam Wunderlich % last update: 5/18/06 function y = PIfun(r,R,h,gamma,x3,sb) temp = R - r*cos(gamma-sb); y = h*((pi - 2*atan(r*sin(gamma-sb)/temp))*(1 + (r^2 - R^2)/ (2*R*temp)) ... + sb) - x3; % find_PI_Line.m % % Find the the parametric interval corresponding to the unique PI-line % passing through the point x for a given helical pitch. % This code implements the method of Kyle Champley. % inputs: P = pitch (cm/turn), R = helix radius, delta_s = s stepsize, x % output: PI = [sb st] % % Adam Wunderlich % last update: 5/18/06 function [PI] = findPI(P,R,delta_s,x) h = P/(2*pi); r = sqrt(x(1)^2+x(2)^2); gamma = atan2(x(2),x(1)); options = optimset('TolX',h*delta_s/100,'FunValCheck','on'); [sb,fval,exitflag] = fzero(@(sb) PIfun(r,R,h,gamma,x(3),sb),... [(x(3)-h*pi)/h,x(3)/h],options); if exitflag ~=1, disp('Error: PI invalid'); end % note that beta=sb in Kyle's formula alphaX = atan(r*sin(gamma-sb)/(R - r*cos(gamma-sb))); st = sb + pi -...

I have a C++ .dll file compiled and built in C++ from source files. I call this .dll file from a MATLAB GUI with the calllib function. I want to step through the C++ code using Visual Studio's debugger when MATLAB calls this .dll. Is there any way to do this without using MEX files and functions? Doing this is exactly the same as debugging a mex file or any dll from any pre-built application. Start MATLAB with the debugger or use attach to process and then set a break point in your source code. "Sean Larkin" <slarkin71278@sbcglobal.net> wrote in message news:gdiokm$78a$1@fred.mathworks.com... >I have a C++ .dll file compiled and built in C++ from source files. I call this .dll file from a MATLAB GUI with the calllib >function. I want to step through the C++ code using Visual Studio's debugger when MATLAB calls this .dll. Is there any way to do >this without using MEX files and functions? "Philip Borghesani" <philip_borghesani@mathworks.spam> wrote in message <gdiu33$elv$1@fred.mathworks.com>... > Doing this is exactly the same as debugging a mex file or any dll from any pre-built application. > Start MATLAB with the debugger or use attach to process and then set a break point in your source code. > > > "Sean Larkin" <slarkin71278@sbcglobal.net> wrote in message news:gdiokm$78a$1@fred.mathworks.com... > >I have a C++ .dll file compiled and built in C++ from source fil...

Hi all, In Matlab, we use fir1 function to calculate fir filter coefficients. For example, fir1(10,0.375) Outputs are: ans = Columns 1 through 10 -0.0019 -0.0133 -0.0161 0.0766 0.2677 0.3742 0.2677 0.0766 -0.0161 -0.0133 Column 11 -0.0019 I wonder how it works and how to implement the fir1(n, wn) function in C programming language. Thanks a lot! Please help! Jedora. "Jedora" <jedora@gmail.com> wrote in message news:1180363763.385273.280640@o11g2000prd.googlegroups.com... > Hi all, > > In Matlab, we use fir1 function to calculate fir filter coefficients. > For example, > > fir1(10,0.375) > > Outputs are: > ans = > > Columns 1 through 10 > > -0.0019 -0.0133 -0.0161 0.0766 0.2677 0.3742 > 0.2677 0.0766 -0.0161 -0.0133 > > Column 11 > > -0.0019 > > I wonder how it works and how to implement the fir1(n, wn) function in > C programming language. > Thanks a lot! > Please help! > > Jedora. Get Jake Janovetz' C code for the Parks-McClellan program and modify as you desire for things like I/O, etc. Fred Fred Marshall wrote: > "Jedora" <jedora@gmail.com> wrote in message > news:1180363763.385273.280640@o11g2000prd.googlegroups.com... >> Hi all, >> >> In Matlab, we use fir1 function to calculate fir filter coefficients. >> For example, >> >> fir1(10,0.375) >&...

Hi! I have recently installed Matlab 7.0. I have save my simulation results in .MAT file. However, these MAT files can't be opened using Matlab 6.5.1. I encountered problem as follows: ??? Error using ==> load Unable to read MAT file D:\MATLAB7\work\results.mat File may be corrupt. How can I solve this problem? Thanks. Linda Please see here: <http://tx.technion.ac.il/~perryb/matlab7/mat7.pdf> In short, save again as: The new features and enhancements are described in the "Release notes" of Matlab. A new feature that causes incompatibility with previous versions of Matlab is the new encoding of MAT files. Matlab release 14 writes character and figure data to MAT-files using Unicode encoding by default. Unicode encoded MAT-files are not readable by earlier versions of Matlab. If you intend to load your MAT-files created with Matlab release 14, you must override the Unicode default during the save. You can override the default encoding by using the -v6 switch with save and hgsave: save filename -v6 hgsave filename -v6 Hope it helps Linda wrote: > > > Hi! > > I have recently installed Matlab 7.0. > I have save my simulation results in .MAT file. > However, these MAT files can't be opened using Matlab 6.5.1. > > I encountered problem as follows: > > ??? Error using ==> load > Unable to read MAT file D:\MATLAB7\work\results.mat > > File ma...

Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

This article is within the scope of WikiProject Brazil , a collaborative effort to improve the coverage of Brazil and Brazil-related topics on ...

We have product for Solar power, Wind Turbine, Biomass, Battery, which your requirements The cassava to ethanol convertion has really changed ...

Hardware stuff for Carbon PS4

List of FAQ From AbiWiki (Redirected from FAQ ) Jump to: navigation , search AbiWord Frequently Asked Questions Contents 1 User FAQ 1.1 General ...

Sponsored by Roads of the Mid-South & West > Illinois Welcome Sign on WB IL St Rt 114 at the Illinois/Indiana State Line near Momence...Illinois ...

Pete Lewis speaks to New York soul/dance legend Leroy Burgess, to discuss the prolific veteran singer/songwriter/producer’s new LP ‘Throwback ...

Someday ago, we have discussed how to get more views with HTML 5 video in previous post. Now, we are going to make this tutorial which tells ...

449.00 Euros = 511.86 US $', LEFT, CAPTION, 'Convertion Devise', WIDTH, 200, FGCOLOR, 'gray', BGCOLOR, '#0000FE', TEXTCOLOR, 'white')" onMouseOut="nd()"> ...

Search for inspiration and reviews on websites, landing pages, newsletters, logos, wireframes, mockups, advertisements, illustrations, layouts ...

Resources last updated: 3/30/2016 12:13:47 PM