Info

This question is closed. Reopen it to edit or answer.

MATLAB RK METHOD NOT GIVING ANY RESULT

1 view (last 30 days)
DEBASHIS PANDA
DEBASHIS PANDA on 14 Dec 2015
Closed: MATLAB Answer Bot on 20 Aug 2021
Hello , Everyone ,Actually In my GUI I am using RK method of order four to solve my problem iteratively. Each individual functions have been called by main function in clicking ENTER button ,But the problem I am facing is I am writing the main function (That uses RK Method)after all sub functions under ENTER BUTTON. The Main function is coming under the last function so running it is running but not getting any result.After running I also used setappdata and getappdata to transfer the variables to other GUI for some ploting operation but it is running not giving any error message ,also not giving any result....... plz help.. Thanks in advance

Answers (1)

sam0037
sam0037 on 22 Dec 2015
It seems you are trying to build a GUI with callbacks which share data among them, but while trying to do this you do not observe any expected result or any other unexpected behaviors like error messages.
Refer to the following MATLAB documentation to learn about 'Sharing Data among Callbacks':
However, I would like to illustrate one of the possible ways to share data between a main function and its sub-function. In this illustration the main function is used to create a UI push button and a UI edit box. The sub-function is the callback to push button and on clicking the push button the string in the edit box is displayed in the MATLAB command window.
function myfunc
PushBtn = uicontrol('Style', 'pushbutton', 'String', 'Push');
textBox = uicontrol('Style', 'edit', 'String', 'Enter Data','Position',[200 200 200 100]);
PushBtn.Callback = {@mysubfunc textBox};
end
function mysubfunc(s,e,textBox_handle)
mydata = textBox_handle.String;
disp(mydata);
end
If you are still unable to get the expected behaviour from your GUI, then it would help to understand the query better if you could share the codes related to this question.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!