user interface - plotting a 2D graph -
i have 2 figures. 1 figure called power , other 1 called cost. want plot cost vs power graph cost y-axis , power x-axis. example:
assume result of cost edit text box this:
c1 = 300 c2 = 500 ct = 800
assume result of power edit text box this:
p1 = 120 p2 = 150 pt = 270
so want plot graph output. example:
p1 = 120 when c1 = 300 p2 = 150 when c1 = 500 pt = 270 when c1 = 800
for information, answer generated after push generate button. want is, once push button, there result @ both edit text , plot on axes figure don't know how it.
if want plot data, can do:
c = [c1 c2 c3]; p = [p1 p2 p3]; plot(c, p);
see e.g. http://www.mathworks.com/help/techdoc/learn_matlab/f3-27853.html details on how customise plots.
Comments
Post a Comment