필터 지우기
필터 지우기

How to plot 2 different graphs at GUI?

조회 수: 1 (최근 30일)
sama
sama 2015년 10월 11일
댓글: sama 2015년 10월 12일
Hello all, i am writing a code in GUI that by pushing a bottom, calculate some mathematic and plot a graph. Then, i need by these result, some other calculation done and another graph pupup without any pushing bottom. Could you please help me for second graph? Thanks a lot

채택된 답변

Walter Roberson
Walter Roberson 2015년 10월 11일
function button1_callback(hObject, eventdata, handles)
f2 = figure(2);
ax2 = axes('Parent', f2);
some_calculated_value = sum(randn(419, 392), 2); %calculate some mathematic
plot(some_calculated_value, 'Parent', ax2); %put up first graph
some_other_calculated_value = exp(-sqrt(some_calculated_value)); %some other mathematic
f3 = figure(3);
ax3 = axes('Parent', f3);
plot(some_other_calculated_value, 'Parent', ax3); %pop up another graph
  댓글 수: 1
sama
sama 2015년 10월 12일
Thanks a lot Roberson. It worked but I think I asked my question not clearly. I am looking to have one of those plot at GUI and another one in another GUI environment.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by