I have written some code in matlab for my application. I want to make a graphical interface so that an user can easily use my code. I do not know, how to link my code or a particular function when user clicks on a particular button. I mean, how to assign a function written by me to a push button so that it will execute the function. And how to give the input to my function and get output after executing the particular function. I am quiet familiar with matlab code. But I am absolutely new with GUI in matlab. Please help me to deal with the above problem. On 4/12/2011 12:37 AM, sk maidul haque wrote: > I have written some code in matlab for my application. > I want to make a graphical interface so that an user can easily use my code. > I do not know, how to link my code or a particular function > when user clicks on a particular button. I mean, how to assign a > function written by me to a push button so that it will execute the function. > And how to give the input to my function and get output after > executing the particular function. > I am quiet familiar with matlab code. But I am absolutely new with > GUI in matlab. Please help me to deal with the above problem. Use GUIDE to make the gui. It is very simple and powerful to use. I use it all the time for my school projects and HW's. I know some prefer to code the thing by hand, but I prefer GUIDE. When you add a button in GUIDE, it will create a callback stub for you automatically...

greeting all, i'm using nonlcon(nonlinear inequality constraint) with GA from the toolbox provided by matlab. does anyone notice the extreme slowlness in evaluating nonlinear constraint as compared to other linear constraint? my problem for nonlinear constraint is as follow c(1)=x+y^2-2*ones(N,1) where x and y are Nx1 vector. which means if N increases, the size of constraint increases. and to clarify, the min problem is sometime like min c'z where z=[x;y], which means x and y are some range of variable within z(just a matter of problem formulation) well, is there anyone with other alternative or is it possible or method in including non-linear constraint directly to fitness function? (well, actually nonlcon deals nonlinear constraint by using Augmented Lagrangian Pattern Search from what i see from the help file, or am i wrong?) and one more question, is there anyone that attempt to attempt to apply mixed integer problem into the GA in matlab? For now, i can only switch before pure integer or pure real number problem, but not mixed at the moment. I will be trying to add in some repair operator to fix up the variable that needs to be integer and other remaining in real number. I'm not sure why you are using ga to solve your problem. Did you find fmincon unsatisfactory in any way? Alan Weiss MATLAB mathematical toolbox documentation On 5/10/2011 11:53 PM, terry wrote: > greeting all, > > i'm using nonlcon(nonlinear inequality constraint)...

Hello All, I'm working with an aplication that use the matlab engine. I made the C++ program and it is working well in my pc with matlab 2007b, but the same very basic program shows an error when I tried to compile it in a pc with matlab R2010b. The error is about the icuuc32.dll. ¿Why is asking this DLL? How can I solve this?. Thanks¡ ...

Hello all, I would like to spawn multiple matlab processes from an '.m' script. Meaning, run an m-file from a 'parent' Matlab that launches, say, 8 more 'children' matlab processes. I'd like to do it in such a way that the same m-file in the 'parent' is able to close down, or kill, all the 'children' processes. Any suggestions? Joe ...

I wanna use matlab C++ math library into VC++6.0, but my matlab is 7.1. if i wanna use matlab C++ math library to programme, how can i setup my VC link?? why matlab7.1 doesn't have "extern->include->cpp" file??? In using matlab C++ math library , what difference between matlab 6.X and matlab7.1??? ...

is there any way to create a time trial version of a program compiled using the matlab compiler? ...

Hi all, I am running into a problem which can be best descrivbed as below: I have a C++ program which calls a matlab created library (compiled with MSVC2008). I am using Qt Creator as IDE and the program is being compiled with MSVC2008 as well. I followed all the instructions regarding the dll compilation and how to integrate it to my code (MCR installation, etc.). I then set up my project file this way: 1. an includepath to the folder where the .lib, .dll, .h have been created D:/C++ Offline/Matlab/ 2. an includepath to .../MATLAB Compiler Runtime/v714/extern/include 3. I link the following libraries D:/C++ Offline/Matlab/Test_Matlab.lib (the library I created) C:/Program Files/MATLAB/MATLAB Compiler Runtime/v714/extern/lib/win32/microsoft/mclmcrrt.lib 4. I added also #include "Test_Matlab.h" Here is the problem: When I compile the application and when calling mclInitializeApplication(NULL, 0) everyhing works ok (including the connection to matlab as the boolean returned evaluates to true) AS LONG AS Test_MatlabInitialize() is NOT in the code (even if it is not called at startup). However as soon as I add in the code Test_MatlabInitialize() (even if not called) I get the following error: Stopped in thread 0 by: Exception at 0x1cdb4a, code 0xc0000005: write access violation at: 0x8, flags=0x0 What I don't understand is that it seems to be able to compile bu not to run the program (crashes immediately) even if the function Tes...

hi, I generated a dll using the matlab command mcc. Then made a project( win32 console application project) in msvc++ using this dll and other files generated from matlab. Wrote a main function as the procedure in the matlab compiler help. That project run wihout any error and got the correct output. Now I want to generate a dll for the entire project( above mentioned ). How can I use the matlab generated dll for generating dll in msvc++? ...

I am currently using SIT 2.0.3 ,using this toolkit i am trying to create the simulation DLL for labview.but i am getting the following error in matlab command window Error: File: C:\SimulationInterfaceToolkit\ModelInterface\basic.tlc Line: 117 Column: 7Undefined identifier ReleaseVersionError: File: C:\SimulationInterfaceToolkit\ModelInterface\basic.tlc Line: 117 Column: 25The == and != operators can only be used to compare values of the same typeError: File: C:\SimulationInterfaceToolkit\ModelInterface\basic.tlc Line: 260 Column: 26Undefined identifier ReleaseVersionError: File: C:\SimulationInterfaceToolkit\ModelInterface\basic.tlc Line: 260 Column: 44The == and != operators can only be used to compare values of the same type Is this a version problem? I am using Simulation interface toolkit 2.0.3 Matlab 7.1.0.246(R14) Service pack Real time workshop V.6.3 Labview 7.1 Microsoft visual C++ 6.0 Can anybody help me to solve this issue. Hi, Unfortunately, it looks like the versions you are using are indeed not compatible. Here is an excerpt from the <a href="http://ftp.ni.com/support/softlib/labview/labview_toolkits/simulation_interface/2.0.3/sit_2_0_3_readme.html" target="_blank">Read Me file</a> for Simulation Interface Toolkit 2.0.3: To use the Simulation Interface Toolkit 2.0.3, you must be a properly licensed user of and have the following software installed on the host computer. - The MathWorks MATLAB ver...

I downloaded the MS visual C++ 2008 Express Edition and the SDK as detailed in http://www.mathworks.com/support/solutions/en/data/1-6IJJ3L/?solution=1-6IJJ3L My embedded function didnt work at the beginning because I did "mex -setup" before I installed my SDK. But after I installed the SDK, I ran "mex -setup" in Matlab once again and choose the MS visual C++2008 as my compiler. Then, my embedded matlab function worked. Thanks to the contribution from above! ...

Is it possible to create a DLL in MATLAB (using deploytool) and call it in MATLAB? I failed to do so. Any help is appreciated ...

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

What is the best way to import Excel files, with stock data, into Matlab? I’m using Matlab R2010b (64-bit) I’m trying to import historical prices of stock data. Matlab keeps cutting off the header of each column; it gives me only values. I am thinking that this is a data-type-mixing-issue, or whatever it’s called. I have ‘Dates’ in ColumnA, and ‘MSFT’, ‘PWER’, ‘KO’, and ‘SBUX’, in ColumnB-ColumnE. Basically, if I put the Excel file in my Matlab folder and double-click the file, I see the values in a matrix (no dates and no headers), I hit ‘Next’. Then, I see only one option; one radio button is enabled – ‘Create variable matching preview’. The other two options, ‘Create vectors from each column using column names’ and ‘Create vectors from each row using row names’ – both are greyed out. I’ve seen videos, on YouTube and on the Matlab site, where people import excel data and these options are NOT greyed out. No matter what I do, there options are ALWAYS greyed out. The problem is, when I click ‘Finish’ in my ‘Workspace’ I have a variable named ‘data’ all values in a 575x4 matrix, but I have NO DATES and I have NO HEADERS on the columns. All of this seems to go into another variable, called ‘textdata’; all dates and headers ate in textdata. This is VERY inconvenient. I’m trying to analyze some stock data and I have no headers, so I have no idea which stock is which (I can figure it out, but I think Matlab should do this for me). Also, I have no dates corresponding to ...

undefined ...

You can use only the Matlab runtime. Install the runtime and the libraries that you are using. ...

What is happening when I type rand(1:10) at the command line? Matlab goes into a 10 minute spin - what's going on? Thanks "Robert" wrote in message <j64asi$5v4$1@newscl01ah.mathworks.com>... > What is happening when I type > rand(1:10) > at the command line? > > Matlab goes into a 10 minute spin - what's going on? > Thanks Hi Robert, You're create a 10-D array with that syntax. Do you just want a vector of 10 uniformly distributed random numbers. x = rand(10,1); % or x = rand(1,10); Wayne Hi Wayne, You're right - that's what I was trying to do... but I was just newbie mucking about trying to work out the syntax and I typed that in - then had a looong wait for Matlab to work through it! Thanks for the explanation. Robert "Robert" wrote in message <j64d2h$dvo$1@newscl01ah.mathworks.com>... > Hi Wayne, > You're right - that's what I was trying to do... but I was just newbie mucking about trying to work out the syntax and I typed that in - then had a looong wait for Matlab to work through it! > Thanks for the explanation. > Robert That's fine. Welcome to MATLAB!!! If that's the worst memory-intensive mistake you ever make, you'll be fine :) I've done much, much worse. Wayne ...

When I create a MATLAB Coder Project and try to convert this function: ------------------------- function y = myResampler(x,m,n) %#codegen fsVec = [8000 16000 32000 48000]; targetFsVec = [8000 16000 32000 48000]; fs = fsVec(m); targetFs = targetFsVec(n); y = resample(x,targetFs,fs); ------------------------- to C-code I get a build error saying: coder -build resamplerproj.prj ??? The upsample factor P must be constant. Error in ==> myResampler Line: 12 Column: 5 Code generation failed: Open error report. But I want to be able to resample x using a variable P/Q ratio. Is this just a limitation of Matlab Coder or am I doing something wrong?? John wrote: > When I create a MATLAB Coder Project and try to convert this function: > > ------------------------- > function y = myResampler(x,m,n) %#codegen > > fsVec = [8000 16000 32000 48000]; > targetFsVec = [8000 16000 32000 48000]; > > fs = fsVec(m); > targetFs = targetFsVec(n); > > y = resample(x,targetFs,fs); > ------------------------- > > to C-code I get a build error saying: > > coder -build resamplerproj.prj ??? The upsample factor P must be > constant. Error in ==> myResampler Line: 12 Column: 5 Code generation > failed: Open error report. > > > > But I want to be able to resample x using a variable P/Q ratio. > > Is this just a limitation of Matlab Coder or am I doing something wrong?? Apparently it's a limitation of RESAMPLE ...

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 wrote a code in matlab 7a andand it was working over there then i changed computer which was having matlab realease 2009a and it is not working If i install Matlab 7 release 14, will my code work again thanks "moonman" wrote in message <ipmsl7$23v$1@fred.mathworks.com>... > I wrote a code in matlab 7a andand it was working over there > then i changed computer which was having matlab realease 2009a and it is not working > > If i install Matlab 7 release 14, will my code work again thanks Can you be more specific about the fact that your code is not working in 2009a but worked in 2007a? It would be helpful if you could narrow down what is not working in 2009a and provide error messages. Wayne ok thanks wyne i will send error message after some hours ...

I'm trying to use the Cambridge Research Systems vsgDesktop toolbox to display a Gabor patch on a second monitor. Specifically, I want to display a sequence of Gabor patches with various contrasts. As far as I've tried, the crsDrawGabor() command does not accommodate this - it displays a Gabor, for which you can alter the size of the Gabor, but that's it. I can't change the contrast, spatial frequency, or anything else using this command. So what I want to do is to use vsgDesktop to display a sequence of Gabor patches, for which I can alter their spatial frequency and contrast settings (0% to 100%). Can anyone help me on this? Jeremy, I just came across your post and don't know if you are still interested in obtaining help with this, but I recommend using the CRS MATLAB Toolbox for the VSG. It is easy to interface to and is a free download for registered VSG systems. You can view the product information at this website: http://www.crsltd.com/catalog/vsgtoolbox/ B "Jeremy" wrote in message <in053p$78k$1@fred.mathworks.com>... > I'm trying to use the Cambridge Research Systems vsgDesktop toolbox to display a Gabor patch on a second monitor. Specifically, I want to display a sequence of Gabor patches with various contrasts. > > As far as I've tried, the crsDrawGabor() command does not accommodate this - it displays a Gabor, for which you can alter the size of the Gabor, but that's it. I can't change the cont...

Hi, I have create a dll using matlab which include a .dll file ,.ctf file and a .h header file. Now i want to use that dll in a c#.net project. I facing a problem when i am giving the reference to the matlab dll it is giving a error stating "dll could not be added please make sure the file is accessible, and is a valid assembly COM object" Please help! Urgently!! So NOBODY help ???? There are some moderator administrator support reading this forum or these pages are just a joke ??? "Yogesh Iparkar" <yogesh.iparkar@gmail.com> wrote in message <hjtt5r$4uq$1@fred.mathworks.com>... > Hi, > > I have create a dll using matlab which include a .dll file ,.ctf file and a .h header file. > Now i want to use that dll in a c#.net project. > > I facing a problem when i am giving the reference to the matlab dll it is giving a error stating "dll could not be added please make sure the file is accessible, and is a valid assembly COM object" > > Please help! > > Urgently!! "Dominique " <domdominy@gmail.com> wrote in message news:hpkk4d$ri1$1@fred.mathworks.com... > So NOBODY help ???? There are some moderator administrator support reading > this forum or these pages are just a joke ??? > > "Yogesh Iparkar" <yogesh.iparkar@gmail.com> wrote in message > <hjtt5r$4uq$1@fred.mathworks.com>... >> Hi, >> >> I have create ...

suggest me the online tutorial of MATLAB . On 2/27/2012 2:06 AM, azim kumar wrote: > suggest me the online tutorial of MATLAB . Best way to learn any language is to solve a simple problem you are familiar with. This way you know what the answer should be, and it is a matter of coding it to obtain the answer, and you'd have a goal to work for. Matlab itself has many on-line tutorials. Help->Online tutorials. --Nasser ...

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

Number of column: 5 Vector A: [ 2 4 6 7 8 ] Vector B : [ 5 7 8 10 1] Choice = 1 : Find the highest value Vector A : 8 Vector B: 10 The highest value : 10 Choice = 2 : Find the lowest value Vector A : 2 Vector B: 1 The highest value : 1 Choice = 3 : Find the average value of : Vector A Vector B "Syamil " <syamilsaid@gmail.com> wrote in message <inq3g8$hhd$1@fred.mathworks.com>... > Number of column: 5 > Vector A: [ 2 4 6 7 8 ] > Vector B : [ 5 7 8 10 1] > > Choice = 1 : Find the highest value > Vector A : 8 > Vector B: 10 > The highest value : 10 > > Choice = 2 : Find the lowest value > Vector A : 2 > Vector B: 1 > The highest value : 1 > > Choice = 3 : Find the average value of : > Vector A > Vector B Type in matlab: doc min doc max doc mean ...

It is often far simpler to request a bot job from an existing bot. If you have only periodic requests or are uncomfortable with programming languages, ...

A woman in Cornwall in the U.K. came up with a creative way to use Facebook to accelerate a family spat, and it earned her 20 months in prison. ...

Quick tips to help you create great content for your business.

Since today executing a POST on a me/video.wacthes endpoints no longer works, it was working around 10 hours ago since then the call always returns ...

Facebook introduced a new feature for events this week that allows users to quickly create a similar event as one they previously hosted or attended. ...

... seen as too dangerous to nominate someone who is so thoroughly narcissistic, arrogant and dishonest. The Obama campaign won basically by creating ...

... with any Bay Area startup these days (ping pong, beer on tap, catered lunches and Macbook Airs) – though these things are, of course, Creating ...

Read reviews, compare customer ratings, see screenshots, and learn more about Campus Coaches: Creating a culture of wellness, one school at a ...

DAVOS/SWITZERLAND, 25JAN13 - Joseph E. Stiglitz, Professor, Columbia University, USA talks during the session 'Creating Economic Dynamism' at ...

Up date...SEE THIS UPDATED VIDEO... http://youtu.be/RKdsXU5iIF0 . I've been building some QRP transmitters and I see that some folk are cutting ...

Resources last updated: 3/31/2016 2:30:47 AM