Hi everyone, Can any one tell me how to convert matlab to c?? Regards. On 5/8/2012 4:36 PM, WMS wrote: > Hi everyone, > Can any one tell me how to convert matlab to c?? > > Regards. http://www.mathworks.com/products/matlab-coder/ "MATLAB Coder™ generates standalone C and C++ code from MATLAB code" ...

undefined ...

Hi, I'm trying to use Coder to covert my Matlab code infested by inevitable for-loops into C to make it faster. I'm getting errors: " Undefined function or variable 'laml'. The first assignment to a local variable determines its class." more details: I use vector laml(1:100) inside a function which is called from main and do not pre-allocate memory (it grows within the cycle). Coder documentation claims to be able to handle this.. How can I declare it for C ? I tried preallocating within the function like this: lalm(1:100) = double(0); But this didn't help. Help please! :) best, lena This may be of no help at all, but I would experiment without doing any pre-allocation in Matlab that is, and see, then if worked, pre-allocate correctly ...

Hi All Do you have some matlab code for the STTC which will give me some Idea. Any helping material or URL regarding the same will kindly be sent to me. I shall be very thankful to you for this act. Regards Kelecha ...

A = [-1 -1 1 1]; %Spread waveform representation of user A's signal B = [-1 1 -1 1]; %Spread waveform representation of user B's signal C = [1 1 -1 -1]; %Spread waveform representation of user C's signal % Generating the code and its timing sequence: % to generate a 4 x 4 Hadamard matrix (which is the matrix of 1's and -1's % and the columns are orthogonal): N = 4; H = hadamard(N); % Picking full second row of Hadamard matrix: cA = H(2,:); % Picking full third row of Hadamard matrix: cB = H(3,:); % Picking full fourth row of Hadamard matrix: cC = H(4,:); % Number of samples per chip: Tc_samp = ones(1,4); % Initializing empty matrices: codeA = []; codeB = []; codeC = []; for k = 1 : length(cA) codeA = [codeA cA(k)*Tc_samp]; codeB = [codeB cB(k)*Tc_samp]; codeC = [codeC cC(k)*Tc_samp]; end codeA % Generation of Tx Data: Tx_data = []; for k = 1 : length(A) uA = A(k)*codeA; uB = B(k)*codeB; uC = C(k)*codeC; Tx_data = [Tx_data uA+uB+uC]; end Tx_data NN = length(Tx_data) uAb = []; uBb = []; uCb = []; for k = 1 : NN / 16 index = (k - 1)*NN/4 + 1 : k*NN/4; uAb = [uAb sum(Tx_data(index).*codeA)]; uBb = [uBb sum(Tx_data(index).*codeB)]; uCb = [uCb sum(Tx_data(index).*codeC)]; end uAb % Error: res1 = A-uAb/16; res2 = B-uBb/16; res3 = C-uCb/16; note: please help me in understanding each statement of ...

Hi, I need to run some simulations results of MAP decoding of BLOCK codes. Has anyone has source code(matlab) of such MAP decoder for block codes t share? Or can someone kindly provide me information on where I can ge such source code? Your help is greatly appreciated. Thanks a lot! kc This message was sent using the Comp.DSP web interface o www.DSPRelated.com kc <lkc_pringles@hotmail.com> wrote: >I need to run some simulations results of MAP decoding of BLOCK codes. >Has anyone has source code(matlab) of such MAP decoder for block codes to >share? Or can someone kindly provide me information on where I can get >such source code? > >Your help is greatly appreciated. I don't have the answer to your question, but I'm curious what sort of block codes you'd like to MAP-decode. It's practical for small Hamming codes. A few years back near-MAP decoding of Hamming constituent codes in a turbo code configuration was popular for awhile, so you could try searching for those implementations. Steve >kc <lkc_pringles@hotmail.com> wrote: > >>I need to run some simulations results of MAP decoding of BLOCK codes. >>Has anyone has source code(matlab) of such MAP decoder for block code to >>share? Or can someone kindly provide me information on where I can get >>such source code? >> >>Your help is greatly appreciated. > >I don't have the answer to your question, but I'm curious ...

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 -...

Can i generate c code from matlab m-files I believe that c code can be generated from simulink models using rea time workshop but can the same be done using m-files instead of simulink. "arslan" <arsl_khalid@yahoo.com> wrote in message news:_KSdnfsQqo6d0srVnZ2dnUVZ_hSdnZ2d@giganews.com... > Can i generate c code from matlab m-files > I believe that c code can be generated from simulink models using real > time workshop but can the same be done using m-files instead of simulink. Look at MCS from AgilityDS http://www.agilityds.com/products/default.aspx Hans www.ht-lab.com arslan wrote: > Can i generate c code from matlab m-files > I believe that c code can be generated from simulink models using real > time workshop but can the same be done using m-files instead of simulink. Yes, if you have the matlab Compiler product. Otherwise you have to code by hand. There are third party converter products, but they aren't cheap. http://www.ancad.com/codeConverter.php On Jun 17, 1:43=A0am, "arslan" <arsl_kha...@yahoo.com> wrote: > Can i generate c code from matlab m-files > I believe that c code can be generated from simulink models using real > time workshop but can the same be done using m-files instead of simulink. Yes, I do it all the time, you have to first drag an embedded matlab block into simulink, then put your m code inside it, there are some limitations as far as what functions you can and cannot use...

Hello, I'm trying to learn how to integrate MatLab code into C#. I'm using Matlab R2010a and Visual Studio 2010. I downloaded the following tutorial and executed the MatLab side of the code: http://www.mathworks.se/matlabcentral/fileexchange/12987 However, when I tried to compile the C# code in visual studio, I got the following error: Could not load file or assembly 'MWArray, Version=2.9.1.0, Culture=neutral, PublicKeyToken=e1d84a0da19db86f' or one of its dependencies. The system cannot find the file specified. A quick google search led me to this page, which instructed me to change the target processor to x86: http://www.mathworks.com/support/solutions/en/data/1-B0JOFC/index.html?solution=1-B0JOFC However, as soon as I did so, I received a new error: System.BadImageFormatException was unhandled Message="Could not load file or assembly 'MWArray, Version=2.0.0.0, Culture=neutral, PublicKeyToken=e1d84a0da19db86f' or one of its dependencies. An attempt was made to load a program with an incorrect format." Another google search led me to this page, which said that components generated by MatLab builder x86 are not supported on x64 machines: http://www.mathworks.com/support/solutions/en/data/1-7457HL/index.html?product=MN&solution=1-7457HL My MatLab version is 64 bit, but I am still encountering this problem. Is there a workaround? HI, I am trying something similar to what you did, but with matlab 20...

Hello every body I want to generate a file using c which when run must show some image moving on screen on a pree specified path and then i want to read the same file in matlab and the screen of matlab must show the same image moving on the screen. with regards shahid khan shahid khan <shahidkhan3@gmail.com> wrote in message <16021750.1230559239618.JavaMail.jakarta@nitrogen.mathforum.org>... > Hello every body > I want to generate a file using c which when run must show some image moving on screen on a pree specified path and then i want to read the same file in matlab and the screen of matlab must show the same image moving on the screen. > with regards > shahid khan So, whats the problem/question? Simply write the c output file in a format that MATLAB can read. May I suggest aviread? Actualy i have written the yuv player for yuv format matlab files i want to write a c code which write the output in yuv format and then i can play it using matlab. Please can u guide me how to write the file in yuv format with regards shahid khan On Dec 29, 8:50=A0pm, shahid khan <shahidkh...@gmail.com> wrote: > Actualy i have written the yuv player for yuv format matlab files i want = to write a c code which write the output in yuv format and then i can play = it using matlab. > Please can u guide me how to write the file in yuv format > with regards > shahid khan ------------------------------------------------------------...

Dear all As you know, when m or p code is running, you can press ctrl - c to terminate it. My question is : How to keep running code no matter whether or not pressing ctrl -c. Regards mayi 2012/5/23 On 5/23/2012 2:13 AM, Mayi wrote: > Dear all > As you know, when m or p code is running, you can press ctrl - c to terminate it. > My question is : How to keep running code no matter whether or not pressing ctrl -c. > > Regards > mayi > 2012/5/23 you can't catch ctrl-c any more in new Matlab's in older versions of Matlab, you could, but not any more. did not try in 2012a, you can try, but I doubt this has changed again. So, out of luck. Just put a big sign on the computer telling everyone not to press ctrl-c becuase you are running a program there? --Nasser "Nasser M. Abbasi" <nma@12000.org> wrote in message news:jpi433$ead$2@speranza.aioe.org... > On 5/23/2012 2:13 AM, Mayi wrote: >> Dear all >> As you know, when m or p code is running, you can press ctrl - c to >> terminate it. >> My question is : How to keep running code no matter whether or not >> pressing ctrl -c. >> >> Regards >> mayi >> 2012/5/23 > > > you can't catch ctrl-c any more in new Matlab's > > in older versions of Matlab, you could, but not any more. Correct; being able to CATCH a Ctrl-C could have gotten you into a loop that you couldn't have escaped without kill...

Hello, Isnt 'unquant' and 'soft' options essentially same?..in both case vitdec takes in "real numbers" as input (ok they are "mapped" in case o 'soft' option)..so can we not use 'unquant' option to carry out sof decoding?...my preliminary results show that 'unquant' option give me 2- db gain over hard decoding... any one having insight please let me know. thanks >Hello, > Isnt 'unquant' and 'soft' options essentially same?..in both cases >vitdec takes in "real numbers" as input (ok they are "mapped" in case of >'soft' option)..so can we not use 'unquant' option to carry out soft >decoding?...my preliminary results show that 'unquant' option give m 2-3 >db gain over hard decoding... >any one having insight please let me know. >thanks > > %%% Yes , u can use 'unquant' as soft decoding. try to implement for k=3 i.e [5 7] and BPSK and at roughly 4 dB u should get BER of 10^-3. Chintan ...

Well, SAS is written in C, so I suppose if you have a decompiler, you can open yourself up to criminal charges for violating the Digital Millenium Copyright Act. Having said that, there are things that you can do in SAS that can also be done in C, but SAS is almost always easier. Bob Abelson KAI Research, Inc. 6001 Montrose Rd. Suite 920 Rockville, MD 20852 T: 301-770-2730 F: 301-770-4183 rabelson@kai-research.com > -----Original Message----- > From: Yang, Kai [SMTP:Kai.Yang@CSHS.ORG] > Sent: Wednesday, October 29, 2003 1:43 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: SAS code to C code? > > Hello, > Is there a way to translate the SAS code to C code? > Thank you > Kai ...

--=====================_464876386==.ALT Content-Type: text/plain; charset="us-ascii"; format=flowed TAO VERSION: 1.4 ACE VERSION: 5.4 HOST MACHINE and OPERATING SYSTEM: Dell Dimension 4100, PIII 733MHz Windows XP Home SP1 WS2_32.DLL version == 5.1.2600.1240 TARGET MACHINE and OPERATING SYSTEM, if different from HOST: same COMPILER NAME AND VERSION (AND PATCHLEVEL): Microsoft Development Environment 2003 v7.1.3088 Microsoft Visual C++ .NET AREA/CLASS/EXAMPLE AFFECTED: for ZZZ.idl, the following generated files get warnings. ZZZS.cpp ZZZC.cpp DOES THE PROBLEM AFFECT: COMPILATION? YES LINKING? NO EXECUTION? NO OTHER (please specify)? SYNOPSIS: for ZZZ.idl, the following files get warnings. ZZZS.cpp ZZZC.cpp DESCRIPTION: the above mentioned generated files get warnings during compilation. the compilation succeeds and everything appears to work fine, so this isn't really a big deal, but I thought I'd report it. Its more of a minor nuisance. compiler output is included at the end of this Email. REPEAT BY: SAMPLE FIX/WORKAROUND: ====================================== Compiling... ZZZS.cpp ZZZS.cpp(627) : warning C4267: 'argument' : conversion from 'size_t' to 'const unsigned int', possible loss of data ZZZC....

Can some one help me the right way of coding the following equation into MATLAB. I am having problems in coding this equation. y = [y0 + A* exp -(x.(x-xc)^2/2w^2)]. (1-exp-(b*x)) lene wrote: > Can some one help me the right way of coding the following equation into MATLAB. I am having problems in coding this equation. > y = [y0 + A* exp -(x.(x-xc)^2/2w^2)]. (1-exp-(b*x)) y = (y0 + A .* exp(-(x .* (x-xc) .^ 2 / (2 * w .^ 2))) .* (1-exp(-b .* x)) "lene" <shazia.naureen@gmail.com> wrote in message news:907898463.131520.1273780800933.JavaMail.root@gallium.mathforum.org... > Can some one help me the right way of coding the following equation into > MATLAB. I am having problems in coding this equation. > > y = [y0 + A* exp -(x.(x-xc)^2/2w^2)]. (1-exp-(b*x)) Certainly. Show us how you coded it and explain specifically what problems you're having (what error or warning do you receive, or what values do you receive that are different than the values you expect) and you should receive some help. -- Steve Lord slord@mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ ...

anyone know about the compression image coding using matlab huffman? On Aug 5, 2:50=A0am, "rizqi " <rizqi.hendr...@gmail.com> wrote: > anyone know about the compression image coding using matlab huffman? yes, me ...

how to code for an improved reversible data hiding in encrypted images using side match? ...

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. 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/ ...

Hi. I am new to this Matlab GUI and would love for your help. I have an m-file that runs perfectly to do detection tumor. But I face a problem which is it cannot do detection for the new image that browse from other file. In my m-file, I already set 12 different images in command slider, so when run the program it can do detection for each image in slider. But how can I make it also can do detection for the new image that had browse from file? I think maybe I need to add in the new image path to the slider command there. But I not really know the new image path in my code.. Any help and advice would be greatly appreciated. Elise ...

Hi, Then you probably don't use Corba Any's. If you use them you are in problems without enabling RTTI, but the best is to enable it as we advice. Johnny > Thanks! Enabling RTTI took the warnings away. Note, though, > that even > with the warnings, my TAO code did build and appeared to run > correctly. > > At 07:10 AM 2/28/2004, Johnny Willemsen wrote: > >Hi, > > > >Thanks for using the PRF form. > > > >You must enable RTTI in your project files. This is now > required when using > >TAO (not when using only ACE). This warning should be read > as error, if you > >don't fix it your TAO app will not build > > > >Regards, > > > >Johnny Willemsen > >Remedy IT > >Leeghwaterstraat 25 > >2811 DT Reeuwijk > >The Netherlands > >www.theaceorb.nl / www.remedy.nl > > > > > TAO VERSION: 1.4 > > > ACE VERSION: 5.4 > > > > > > HOST MACHINE and OPERATING SYSTEM: > > > Dell Dimension 4100, PIII > > > 733MHz > > > Windows XP Home SP1 > > > WS2_32.DLL version == > > > 5.1.2600.1240 > > > > > > TARGET MACHINE and OPERATING SYSTEM, if different from > > > HOST: same > > > > > > COMPILER NAME AND VERSION (AND PATCHLEVEL): > > > Microsoft Development > > > Envi...

Hello All, The 'quick select' algorithm finds the kth smallest element in the array wi= thout doing a sort first (https://en.wikipedia.org/wiki/Quickselect ). With= proper selection of the k value(s) it is one of the fastest algorithms to = find the median. I have spent considerable time trying to find a not-'in-place' 'quick selec= t' algorithm. I have written my own version in MATLAB, but I am certain the= re is an implementation 'out there' that is more optimized than what I have= done (hopefully in C). I found a reference to the not-'in-place' version being significantly faste= r than the 'in-place' version, which makes sense because it eliminates a lo= t of data swapping within the array at a cost of additional memory that is = 1X or 2X the size of the input array. Since I want to apply it to a fairly = short array, having one or two additional arrays of the same length is not = significant in terms of memory. Does anyone know where to find an optimized not-'in-place' version of 'quic= k select'? Thanks, Dirk Bell ...

I am not looking for a lint-like static code analyzer, I would like to check against coding standards like variable naming, capitalization, spacing, identation, bracket placement, and so on. On 2016-02-24, Ashim Goldar <ashim.goldar@gmail.com> wrote: > I am not looking for a lint-like static code analyzer, I would like to > check against coding standards like variable naming, capitalization, > spacing, identation, bracket placement, and so on. If you are looking for something open source, you could try cppcheck [1]. It runs on Windows, OSX, Linux, BSD and is quite configurable. Supports both C and C++ and has a fairly extensive list of checks [2]. [1] http://cppcheck.sourceforge.net/ [2] https://sourceforge.net/p/cppcheck/wiki/ListOfChecks/ On 2016-03-11, Jeff Parent <jeff@commentedcode.org> wrote: > On 2016-02-24, Ashim Goldar <ashim.goldar@gmail.com> wrote: >> I am not looking for a lint-like static code analyzer, I would like to >> check against coding standards like variable naming, capitalization, >> spacing, identation, bracket placement, and so on. > > If you are looking for something open source, you could try cppcheck [1]. > It runs on Windows, OSX, Linux, BSD and is quite configurable. Supports > both C and C++ and has a fairly extensive list of checks [2]. > > [1] http://cppcheck.sourceforge.net/ > [2] https://sourceforge.net/p/cppcheck/wiki/ListOfChecks/ Sorry, just ...

i've discovered (on my server) that it doesn't seem to be necessary to call data from a form via $_POST, or to retrieve cookies via $_COOKIE, and other such things; they are available by name alone. however, i've heard that just because you CAN do something, doesn't mean you SHOULD. my question: is this considered bad practice? also, when submitting a file via <input name="file" type="file" /> i find that not only does $file get set, but $file_name and others also "magically" get set... I guess I just find that odd coming from C++ where nothing seems to do work for you... quite nice and handy though :) >i've discovered (on my server) that it doesn't seem to be necessary to >call data from a form via $_POST, or to retrieve cookies via $_COOKIE, >and other such things; they are available by name alone. however, i've register_globals is a security problem. Don't write code that depends on it. >heard that just because you CAN do something, doesn't mean you SHOULD. >my question: is this considered bad practice? Yes. And you'll probably find some hosting companies that WILL NOT turn on register_globals for any price. Gordon L. Burditt great! thanks. that's all I wanted to know. ...

hallo how can I write this C-Code in LabVIew , for a=0; a=<10; a++ { for b=0; b=5 ; b+2 { X= 3+b; } Y=1+a; } please see the attachment and tell me where is the problem Unbenannt 11.vi: http://forums.ni.com/attachments/ni/170/305033/1/Unbenannt 11.vi I can't open 8.5, but I would suggest you use a For Loop <img src="http://forums.ni.com/attachments/ni/170/305038/1/example.PNG"> Message Edited by JeffOverton on 02-28-2008 11:53 AM example.PNG: http://forums.ni.com/attachments/ni/170/305038/1/example.PNG Well, at least you tried and got some of it right. :smileyhappy: I think this should do what you want, but my C is rusty. Is the increment performed before or after the loop executes? If it's after, then I believe the loop should iterate 11 times, not 10. <img src="http://forums.ni.com/attachments/ni/170/305051/1/C.png"> In any case, you should note that for a literal translation, you would need to add a sequence structure to guarantee that Y was written to only after the inner loop finished because of the way data-flow works.. Also, note that controls and indicators in LabVIEW are not equivalent to variables. They can be used as such, but they usually should not be. Another poi...

PastBook , one of several companies that allow Facebook users to publish their content on the social network in actual books , announced the ...

Back when Facebook first launched Facebook Pages, many businesses and brands who had built up substantial audiences in their Facebook Groups ...

Get Zwartz Laminating-Converting B.V. on the App Store. See screenshots and ratings, and read customer reviews.

jurvetson posted a photo:

May Day Demonstration on Union Square in New York City Zionism & Birth of Modern Israel in 1948: Former Soviet Citizen Pays Tribute to Ben-Gurion ...

A one-man crusade by a Broken Hill resident to solve the historic town's water crisis by introducing air to water converters is gaining support. ...

Is there a way to convert a print queue item to a .RTF or .PDF file? I like to save or email them. - The Sydney Morning Herald

Khartoum, Sudan: A Christian Sudanese woman sentenced to hang for apostasy has given birth in jail, a Western diplomat said on Tuesday.

The prison system has enlisted the help of ASIO to crack down on radicalisation behind bars amid revelations that Aboriginals are converting ...

Image: Trucks carrying logs make their way up a road in Jambi, Indonesia. A vast area of the Sumatran forest, and orangutan habitat, is being ...

Resources last updated: 3/30/2016 12:38:54 PM