%2D grafika
x = linspace(0, 2*pi, 30);
y = sin(x);
z = cos(x);
plot(x,y,x,z)
%%
grid
xlabel('Independent Variable X')       % x-axis label
ylabel('Dependent Variables Y and Z')  % y-axis label
title('Sine nad Cosine Curves')        % title the plot
%%
text(2.5, 0.7, 'sin(x)')
gtext('cos(x)')
%%
axis off
%%
axis on, grid off
%%
axis ij
%%
axis ('square', 'equal')
%%
axis ('xy', 'normal')
%%
x = linspace(0, 2*pi, 30);
y = sin(x);
z = cos(x);
plot(x,y, '*', 'MarkerSize', 10, 'LineWidth', 2 )
%%
hold on
plot(x,z,'m', 'LineWidth', 3)
hold off
%%
%subplot_demo, polar_demo, bar_demo, ginput_demo, fill_demo
%%
fplot('cos', [0 3*pi],'-*' )
%%
fplot('sin(z)', [0 3*pi],'-*')
%%
fplot('[cos(x), sin(x)]', [0 3*pi],'-*')
%%
[x,y] = fplot('cos(x)', [0 3*pi], '*');
%%
plot(x,y,'-*')
%%
t = 0:0.01:2*pi;
ezpolar( 'sin(t)/t', [-6*pi,6*pi])
%%
ezplot3('cos(2*pi*t)','sin(2*pi*t)','t',[0,4])
%%
ezsurf( 'x*y*exp(-(x^2+y^2))' )
%%
shading interp, colorbar
%%
ezsurf('(1-s)*(3+cos(t))*cos(4*pi*s)', ...
       '(1-s)*(3+cos(t))*sin(4*pi*s)', ...
       '3*s + (1 - s)*sin(t)', [0,2*pi/3,0,12],120 ),
%%
shading interp
%%
x = (0:1/2000:1)';
plot(x,cos(tan(pi*x)))
%%
%zoom on
%%
fplot('cos(tan(pi*x))', [0 1])
%%
fplot('cos(tan(pi*x))', [0 1], 1.0e-4)
%%
%function y = f01(x)
%y = cos(tan(pi*x));
%%
fplot('f01', [0 1])
%%
x = 0:0.1:4*pi;
z = [cos(x)' sin(x)' sin(x).^2'];
plot(x,z)
%%
plot(peaks)
%%
plot(peaks, rot90(peaks'))
%%
y = 1:40;
plot(peaks(40),y)
%%
meshgrid([-2:1:2])
[X, Y] = meshgrid([-2:1:2])
%%
[X, Y] = meshgrid([-2:.1:2]);
%%
Z = X.* exp(-X.^2 - Y.^2);
%%
plot3(X, Y, Z)
