Info
此问题已关闭。 请重新打开它进行编辑或回答。
MATLAB RK METHOD NOT GIVING ANY RESULT
1 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
sam0037
2015-12-22
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.
0 个评论
此问题已关闭。
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!