Varying input variables in a GUI

조회 수: 1 (최근 30일)
Sam
Sam 2013년 4월 19일
Hello!
I have a function in two variables, b and e.
I initially fixed b as 2 and plotted f(e) vs e, e went from -0.3 to 0.3.
Now, I want to vary b from 1.6 to 2.4 and see how the graph of f(e) changes.
How do I write the code for this so that I can create a GUI with the slider?
Thank you!

답변 (1개)

Thomas
Thomas 2013년 4월 19일
I dont know much about sliders, but can't you simply plot a surface plot of f(b,e)?
Like
[grid_e grid_b] = meshgrid(-.3:.01:.3, 1.6:.01:2.4);
surf(grid_e, grid_b, f(grid_e,grid_b))
?
  댓글 수: 1
Sam
Sam 2013년 4월 19일
I actually don't want a surface plot. I want a 2D plot of f(e) vs e where I can see how f(e) changes when b changes from 1.6 to 2.4.
How do I do that?

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

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by