f



passing the value get from an edit text to a listbox callback function

How can I pass the value got from an edit text item:
user_entry_epochs = str2double(get(hObject,'string'));

to a listbox_callback function?
Please answer...It is extremely important...
0
christoss (17)
1/11/2007 5:52:31 PM
comp.soft-sys.matlab 211266 articles. 22 followers. lunamoonmoon (257) is leader. Post Follow

1 Replies
416 Views

Similar Articles

[PageSpeed] 9

"Nick Nichols" <christoss@gmail.com> wrote in message 
news:ef4ad8c.-1@webcrossing.raydaftYaTP...
> How can I pass the value got from an edit text item:
> user_entry_epochs = str2double(get(hObject,'string'));
>
> to a listbox_callback function?
> Please answer...It is extremely important...

Why not have the listbox's callback function extract the String from the 
edit text box directly?

-- 
Steve Lord
slord@mathworks.com 


0
slord (13689)
1/11/2007 6:16:41 PM
Reply:

Similar Artilces:

How can I use the value of a variable from a 'edit-text' callback function to a listbox callback function and use it there?
I have this code taking the value in the edit_callback function: user_entry_epochs = str2double(get(hObject,'string')); if isnan(handles.user_entry_epochs) errordlg('You must enter a numeric value','Bad Input','modal') return end Do you know how can I use user_entry_epochs in the listbox1_Callback or in button callback function? Nick Nichols wrote: > > > I have this code taking the value in the edit_callback > function: > user_entry_epochs = str2double(get(hObject,'string')); > if isnan(handles.us...

Passing Value from one function to another function in MATLAB GUI!
Hi, Here is the screenshot of my GUI: http://i54.tinypic.com/iemg7o.png In the pushbutton1 of File Path which has Browse written over it, I have used the following code: function pushbutton1_Callback(hObject, eventdata, handles) [FILENAME, PATHNAME] = uigetfile; And in the pushbutton2 which has Send! written over it, I have used the following code: function pushbutton2_Callback(hObject, eventdata, handles) input_sec_info=get(handles.edit1,'String'); Encoder(input_sec_info,FILENAME, PATHNAME); Now that the pushbutton2 passes input_sec_info,FILENAME, PATHNAME as arguments to Encoder function. But the FILENAME, PATHNAME are deleted as they are a part of another function. So, when I click the pushbutton1, the variables FILENAME, PATHNAME are created and saved. But when I click the pushbutton2, the variables FILENAME, PATHNAME are deleted because they are part of someother function. But I need all 3 variables including input_sec_info,FILENAME, PATHNAME. So, is there anyway that I can save variables FILENAME, PATHNAME and use them later. I know how to save it in .mat and recall it but it makes the GUI very un-friendly (because it opens up other dialog boxes for saving .mat file even if you give it the .mat file name to be saved with). Is it possible to do it through the code? Thank you. "Asad Asad" wrote in message <itsaou$1sh$1@newscl01ah.mathworks.com>... > Hi, > > Here is the screenshot of my GUI: > > http://i54.tinypic.com/iem...

Class and object confusing - passing to function
Hi there, I have a bit of confusion which I'm sure will be easily explained by the experts here. I'm implementing a class which had worked well for getting values from a DB and representing them as an object. However, I however, I'm confused by behavior when passing a object value to another class function as it's value does not seem to get sent to the class function. The class contains a public function which loads many values into a public variable for the class. Therefore something like this: class { public $DBrowArray; // After a DB call is loaded with an array wh...

Callback function for a listbox in MatLab
I have successfully created a listbox in a dialog that includes an OK button. The listbox is being populated properly. The problem I am having is I am not sure how to return the user selected information from the listbox to the main program ( basically the program that makes a call to the listbox GUIDE code). ...

getting values from edit text of GUI
Hi, I am new user of MAT LAB. I want to get value from edit text of GU I. So that I can use this value entered by the user when displayed by GUI, in main m.-file which is the main program I am writing. Please help. With regards. str=get(editBoxHandle, 'string'); if it's a numerical value: num= str2num(str); Hello, I am also working on developing a GUI for my application. I am encountering a couple of problems. First is that I am using the same code you have jolted down, but the 'num' (variable as below) remains only in the edit box callback function. I want it to be ...

To get function in edit text in a GUI
Hi, I designed a gui which has an edit text. I want to write some funcitions (((for example:1+heaviside(i-10)))) and get this function into calculation. How can I get this from edit text? ...

edit box values to be passed to a function
i have created four edit boxes, one push button, and two radio buttons using guide. when radio button 1 is pressed, it should call a function (that must be a separate .m file) containing some equations which uses the values from the edit boxes, calculate and store it in a file. when radio button 2 is pressed, it should also call a function (which is stored as radio2.m ) containing some equations which uses the values from the edit boxes, calculate and store it in a file. how to do it. kinldy help viji ...

About setting value for edit-text in Matlab GUI
I created a message panel using edit-test, and name its tag as 'messagePanel'. In the callback function of a button, I want the following sentences being printed through my message panel subsequently, like, function myButton_Callback(hObject, eventdata, handles) msg1 = 'abcde'; set(handles.messagepanel, 'String', msg1); msg1 = 'fghij'; set(handles.messagepanel, 'String', msg2); I assume that msg1 and msg2 should be printed out consecutively, however msg1 was never printed. Could anyone tell me the reason:? Thanks in advance. "YI...

How to pass address and get the value from function in REALbasic?
Hi, I am a newbie to REALbasic and have a simple query What will be the equivalent code in REALbasic Code: void* handle; ===> pointer to handle getUniqueHandle(someParam, &handle); ==>2nd parameter will be & hanldle Thanks and Regards, Rohit Dhamija In article <1159458509.075869.26570@i3g2000cwc.googlegroups.com>, "rohit" <rohit.dhamija@gmail.com> wrote: > What will be the equivalent code in REALbasic > > Code: > void* handle; ===> pointer to handle > getUniqueHandle(someParam, &handle); ==>2nd parame...

Getting output from MATLAB GUI (edit text)
Hello guys, I've been trying to figure out what's wrong with the GUI (presented below) when I try to get the text inserted in 5 different edit textboxes. When I run the command: [a,b,c,d,e] = GUI_input_parameter I get the following error: Attempt to reference field of non-structure array. Error in GUI_input_parameter>GUI_input_parameter_OutputFcn (line 74) varargout{1} = handles.data1; Error in gui_mainfcn (line 263) [varargout{1:nargout}] = feval(gui_State.gui_OutputFcn, gui_hFigure, [], gui_Handles); Error in GUI_input_parameter (line 40) [vararg...

How to pass a function to a function?, and how to pass the variables of the function?
I'd like to write a function like: function f(){ ... bla ...} f_example(f); function f_example($function_to_execute) {...bla... $function_to_execute() ...bla....} AND how to pass the variable of the function : function f_example($function_to_execute($var1,$var2)) {...bla... $function_to_execute() ...bla....} Thank you in advance for the time you'll spend for me, Andrea. I'm sorry, I don't quite understand what you are asking... If you are asking how to use results of a function in another function then you should do this. function test1() { return "Hello Wor...

How to set or get value of edit text on another gui
In my main Gui, I am trying to use callback to display another GUI but I don't know how to change the value of edit component in the second gui. Who can tell me how to do it. Thank you in advance "frank zhu" <fzhu@tracedetection.com> wrote in message news:eee4469.-1@webx.raydaftYaTP... > In my main Gui, I am trying to use callback to display another GUI > but I don't know how to change the value of edit component in the > second gui. Who can tell me how to do it. Thank you in advance You need to use one of several(!) ways of transferring data. For instance, ...

How to get a return value of a user-defined callback function
I use java swing component to design the GUI, and I set a callback function to a button in the main function as follow: ======================= hProjDirButton = JButton('Project Directory'); set(hProjDirButton,'ActionPerformedCallback',{@NewProjDirChooserCallback, hProjDirButton, projInfo}); what I need is to pass the "projInfo" to the callback function, change the value within the callback function, and finally pass it back to the main function. ======================= function NewProjDirChooserCallback (hObject, eventdata, handles, projInfo) .....do something w...

How to get max value of a function subject some constraints in Matlab
This is a math problem in my project. If theta_N=[a b c d]', which is variable. theta_0=[a0 b0 c0 d0]',which is constant and known. PN is a 4X4 positive definite symetric matrix, which is constant and known. If Y=T^2*(a-a0)+T*(b-b0)+(c-c0)+t*(d-d0). Here, T and t are constant and known value. Y is scalar. I need get the max value of |Y|, and corresponding theta_N The constaint is (theta_N-theta_0)'*(PN^-1)*(theta_N-theta_0)<=alpha alpha is a constant and known value. I asked this question in sci.math, someone told me I should use Lagrange multiplier method. But I don't ...

evaluate function in excel and get value into matlab via AxtiveX
Hi everyone, I am trying to get the outcome of a function in excel into Matlab via ActiveX. HandleSBP = get(properties_sheet.Cells,'Item',3,21); SBP = get(HandleSBP, 'Value'); however this returns a 'NaN', which probably comes from the textual function in the specific cell I am adressing: =IF(COUNT(C15:C20)>0;AVERAGE(C15:C20);"") is there an way to get the outcome of the function insted of the textual contents of the cell? Second question, is there some manual regarding ActiveX and Matlab, and the commando's and their structure? Thanks in advance!...

Passing a MATLAB function to a C function
Hi. I have the following setup: 1) a function of several variables implemented in MATLAB which I want to optimize, i.e. to find variable values for which the function gives minimal value, 2) a very good local optimization procedure implemented in C which I want to use repeatedly to optimize the above mentioned function, and 3) a procedure for generating the local search starting points implemented in MATLAB again. Thus, I need to run a MATLAB function which will iteratively generate a starting point and run a C-function local search procedure from that point. I must pass a function de...

How can I get the return value from a Ruby function, but inside the set_trace_func callback?
Hi folks, When my code is executing my trace_function set using set_trace_func how do I get the return value for a ruby return event? Say for example I had a function def myFunc(arg1, arg2) result = arg1 * arg2 end and my trace function has been called for the return event for the myFunc() function. The function always returns the last data item evaluated, which in this case is result. Can I determine this value from inside the trace function? If I can how do I do so? I've spent all this afternoon trying to do this (and the other problem in my other ques...

How to get a ordered text combining Text and values
How can I to get a correct label in this case: In[]: k=18; Text["My curve for" k "units"] Out[]: My curve for 18 units Thanks k = 18; Text["My curve for " <> ToString[k] <> " units"] My curve for 18 units Bob Hanlon ---- Miguel <misvrne@gmail.com> wrote: > How can I to get a correct label in this case: > In[]: k=18; > Text["My curve for" k "units"] > > Out[]: My curve for 18 units > > Thanks > Some examples with increasing levels of format control. ...

MATLAB function name passed in a function call
I have a statement as follows: wc = FWT_PO(x_use,4,QMF) where QMF is the name of a MATLAB function (QMF.m, the Quadrature Mirror Filter function). x_use is an array. The function FWT_PO is just regular MATLAB statements. Problem is that control immediately goes to QMF.m whereupon it bombs out with a "not enough input arguments" error message. Do not understand this form of function call line, cannot find it described in the MATLAB "Help", & thus do not understand cause of the error or how to fix. In article <eed8cdf.-1@webx.raydaftYaTP>, kbannister@ara.com says...

Passing array valued functions as argument to function.
Hi all, I've spent several years working with Fortran 95, yet somehow I've never needed to write functions which use other functions as arguments until today. I've struggled to make sense of this from the books I have to hand (no M&R just now). The purpose of the code will be to compute a definite integral of the passed function. Here's a toy code example of what I naively expected to work: MODULE one CONTAINS FUNCTION f1(x_in) RESULT (y_out) DOUBLE PRECISION :: x_in(:) DOUBLE PRECISION :: y_out(SIZE(x_in)) y_out = 2*x_in END FUNCTION f1 END MODULE one...

How to get selected text from a text edit control?
I created a text edit control using CreateEditTextControl. I can get the current text by calling char buf[256]; Size textSize = 0; GetControlData(controlRef, kControlEditTextPart, kControlEditTextTextTag, 255, buf, &textSize); but how do I get only the text that is currently selected (highlighted)? thanks, Shai In article <1111086224.345185.78280@g14g2000cwa.googlegroups.com>, shai@waves.com wrote: > I created a text edit control using CreateEditTextControl. > I can get the current text by calling > > char buf[256]; > Size textSize = 0; ...

Select and get text from Edit text filed
Hi, I need to make a simple text editor in matlab gui. I want is the user to be able to select part of the text he had typed and make the fontweight bold. I don't know how to get the selected text. Can you give me some clues? Thanks. ...

When passing functions as args, how to pass extra args for passed function?
When I pass a function as an arg, like for map(...), how do I pass args to use for that function? If I have a function like this: def pretty_format(f, fmt='%0.3f'): return fmt % f I want to use it with map() like this: formatted = map(pretty_format, unformatted_list) #exept I want fmt='%4.5f' !!! I need to figure out how to pass a non-default value for fmt. How do I do that? On Tue, 16 Sep 2003 17:08:53 -0400 (EDT), rumours say that python@sarcastic-horse.com might have written: >When I pass a function as an arg, like for map(...), how do I pass args to >us...

Issue passing a stem to a function! used the value() function.
Hello everyone, I'm trying to pass a stem variable to a function and I'm having issues after looking at this tutorial. It says to pass a stem variable to the function the following way: /*stem example*/ call rxfuncadd 'sysloadfuncs', 'rexxutil', 'sysloadfuncs' call sysloadfuncs data.0 = 3 data.1 = "hi" data.2 = "hello" data.3 = "lawlz" call mysub 'data', data.0 mysub: parse arg array, n do i = 1 to n if value(array'.i') < 0 then do call value array'.i', 0 say array.i end end But the output of this is nothing, when it should be hi, hello, lawlz Any ideas? I'm using ooRex. My real problem is I populated a stem varaiable and now I want to write the contents to file, but to do this, I'll need to access the elements data, and I would like to pass it to a function to write to the file. Thanks! :) -- IBM Intern > Hello everyone, I'm trying to pass a stem variable to a function and > I'm having issues after looking at this tutorial. In your case I would use: call mysub data. Mysub: Procedure Use arg mystem. /* Stem from caller becomes mystem. here */ Do I = 1 to mystem.0 Say 'Data.'i 'in the caller is' mystem.i End Return Beware, that changes to "mystem." inside Mysub will change the corresponding stem in the calling routine ("data." in the example above). Also, do not use: Mystem. = '' I...

Web resources about - passing the value get from an edit text to a listbox callback function - comp.soft-sys.matlab

Callback (computer programming) - Wikipedia, the free encyclopedia
In computer programming , a callback is a piece of executable code that is passed as an argument to other code, which is expected to call back ...

jQuery callback on image load (even when the image is cached)
I want to do: $("img").bind('load', function() { // do stuff }); But the load event doesn't fire when the image is loaded from cache. The jQuery ...

Callback Dialer - cheap calls/VoIP without WiFi/3G on the App Store on iTunes
Get Callback Dialer - cheap calls/VoIP without WiFi/3G on the App Store. See screenshots and ratings, and read customer reviews.

Uh-Oh! Hackers Screw Up Biglaw Callbacks At T14 Law School
Which law school experienced a hack that could've put students' careers in jeopardy?

Android Device Manager adds message and callback number options for lost phones
Android Device Manager, the service that helps you locate and lock lost devices, is picking up an update on the web and for Android that gives ...

Fantastical For iPhone Updated With New Event List View, Callback URL And More
... in the event list. This serves as an alternative to the default infinite event list, which can be quite confusing at times. Another is x-callback-url ...

'So You Think You Can Dance' recap, callbacks in L.A. - Baltimore Sun
Callbacks in Los Angeles (actually Pasadena), where 157 hopefuls will be winnowed down to 20 finalists. There will be tears, injuries and mental ...

Taylor Swift’s New Video Has Loads Of Callbacks To Harry Styles
Spoiler alert: This may be the final time we see any references to Haylor.

The Jurassic World Trailer Teaser Is A Perfect Callback To The Franchise's Greatest Moment
Jurassic World 's first teaser is coming, and we have the announcement that proves it. Something big is coming, this Thanksgiving.

Toyota joins recall spree with 380,000-vehicle callback
... Lexus GS 350 sedans. FORTUNE Another day, another automotive recall. This time it's Toyota (TM) that's joining the string of recent car callbacks. The ...

Resources last updated: 3/7/2016 6:48:09 PM