Professional Documents
Culture Documents
1:3*pi;
>> f=sin(x);
>> g=sin(x).^2;
>> plot(x,f)
>> plot(x,f,'c.-')
>> grid on
>> title('f(x)=sin(x)')
>> xlabel('x')
>> ylabel('y')
>> %2 grafik
>> figure(2)
>> plot(x,g,'m.-')
>> grid on
>> title('f(x)=sin(x)')
>> title('g(x)=sin(x)^2')
>> xlabel('x')
>> ylabel('y')
>> %3 grafik
Третяя пула
>> subplot(2,2,2)
plot(x,f)
plot(x,f,'c.-')
grid on
title('f(x)=sin(x)')
xlabel('x')
ylabel('y')
>> subplot(2,2,1)
>> plot(x,g,'m.-')
grid on
title('g(x)= sin(x)^2')
title('f(x)=sin(x)')
title('g(x)=sin(x)^2')
xlabel('x')
ylabel('y')
g(x)=sin(x)2 f(x)=sin(x)
1 1
0.5
0.5 0
y
y
-0.5
0 -1
-10 -5 0 5 10 -10 -5 0 5 10
x x
data1 data1