function entering and plotimg
Ältere Kommentare anzeigen
hey, i want to input a function of t(time) in my edit text box.then i want this function to be plotted with respect to time in the axes.how can i do that.
Akzeptierte Antwort
Weitere Antworten (1)
Paulo Silva
am 30 Jun. 2011
function test123
figure
axes('Position',[0.2 0.2 0.7 0.7]);
pbh1 = uicontrol(gcf,'Style','pushbutton','String','New plot',...
'Position',[10 40 60 40],...
'callback',@newcomb);
tx = uicontrol(gcf,'Style','edit','String','',...
'Position',[10 10 600 30],'FontSize',20);
function newcomb(obj,ev)
cla
t=0:0.01:10;
f=get(tx,'String')
ezplot(f)
end
end
Kategorien
Mehr zu Interactive Control and Callbacks finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!