%Construirea graficului func?iei de o variabil? pe
segmentul indicat ?n ferestre diferite. figure x = -0.2:0.1:4; g = x.^2+x+2; plot(x,g,'mo');
ex1c
%Construirea graficelor folosind comanda subplot ?ntr-o
fereastr? pe axe %diferite,orizontal. x = -0.2:0.1:4; g=x.^2+x+2; subplot(2,1,1); plot(x,g,'mo'); title('f(x)'); hold on f=x.*log(x.^2+1); subplot(2,1,2); plot(x,f,'g*'); title('f(g)'); hold on
xlabel('x'); ylabel('f,g'); grid on
ex1c2
%Construirea graficelor folosind comanda subplot ?ntr-o
fereastr? pe axe %diferite,vertical. x = -0.2:0.1:4; g=x.^2+x+2; subplot(1,3,1); plot(x,g,'mo'); title('f(x)'); hold on f=x.*log(x.^2+1); subplot(1,3,2) plot(x,f,'g*'); title('f(g)'); hold on subplot(1,3,3); plot(x,f,'g*',x,g,'mo'); title('fx,fg'); xlabel('x'); ylabel('f,g'); grid on
ex1c3
% Construirea graficelor ?ntr-o fereastr? – fiecare aparte
pe axe diferite % ?i ambele pe acelea?i axe(ambele pe axele din dreapta) x = -0.2:0.1:4 g=x.^2+x+2; subplot(2,2,1); plot(x,g,'mo'); title('f(x)'); hold on f=x.*log(x.^2+1); subplot(2,2,3) plot(x,f,'g*'); title('f(g)'); hold on subplot(1,3,3); plot(x,f,'g*',x,g,'mo'); title('fx,fg'); xlabel('x'); ylabel('f,g'); grid on
ex1c4
%Construirea graficelor ?ntr-o fereastr? – fiecare aparte
pe axe diferite %?i ambele pe acelea?i axe(ambele pe axele de sus). x = -0.2:0.1:4; g=x.^2+x+2; subplot(2,2,3); plot(x,g,'mo'); title('f(x)'); hold on f=x.*log(x.^2+1); subplot(2,2,4) plot(x,f,'g*'); title('f(g)'); hold o subplot(2,2,[1,2]); plot(x,f,'g*',x,g,'mo'); title('fx,fg'); xlabel('x'); ylabel('f,g'); grid on
ex3
%Construirea graficului func?iei de dou? variabile pe un