GUI: General code to plot on GUI using an exisiting loop that plots a concentration vs time curve

2 views (last 30 days)
So in my main code, I have a loop with time and concentration function and it is plotted (three plots) depending on user inputted points of interest. It plots perfect, three red curves on three subplots of a figure. I have a GUI that has the three axes and white templates and is ready for me to tie in the main code to that. How can I tie those two, so that whatever my main code graphs, the GUI graphs? I tried putting this:
axes(handles.plot1)
plot(t,C(pof),'r*')
xlabel('concentration')
ylabel('time')
where pof is the user inputted point of interest. I created like in the beginning of the code. This is not the whole script.

Answers (1)

Image Analyst
Image Analyst on 16 Mar 2015
I don't understand. What is C(pof)? Anyway, why don't you just have one consolidated program that plots all three instead of having a "main code" and a "GUI"? Then make a function called Plot3Curves() and put all your code in there and call that function whenever you want.

Tags

Community Treasure Hunt

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

Start Hunting!