integration of equation using gui
이전 댓글 표시
Hello, I want to find integration of equation using gui. That's my code, why it doesn't work? Please help me and explain in very simple words, I'm at the very beginning of learning matlab.
function calculator
% tworzenie okna GUI
f = figure('Visible','off',...
'Position',[480,500,500,480]);
integration = uicontrol('Style','pushbutton',...
'String','integration',...
'Position',[315,170,70,25],...
'Callback',@integration);
hinput_g = uicontrol('Style','edit',...
'Position',[120, 200,240,40],...
'String','function');
set(f,'Name','Moja aplikacja GUI');
set(f,'Visible','on');
function integration(~,~)
x = get(hinput_g,'String');
x=str2func(x);
syms c
c= int(x)
msgbox(sprintf(c));
end
end
댓글 수: 3
John D'Errico
2023년 1월 17일
편집: John D'Errico
2023년 1월 17일
I changed your subject heading to indicate you were integrating using a gui, not a guitar, which would somehow imply you were using a musical instrument to perform an integration. (Yes, I know this kind of typo is almost always a spell checker getting involved.) And while there were strings involved in your code, they would not belong on a guitar. This will cause less confusion in people who will look at your question, or not look as they might think the question was about something completely different.
Alicja
2023년 1월 17일
John D'Errico
2023년 1월 17일
Blasted spell checkers. I'll never forgive the old IBM utility, which many years ago, could find only one replacement for what it thought was my mis-spelled name of D'Errico in a document. It wanted to substitute "derelict" for my name.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Operations on Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!