Открыть Электронные книги
Категории
Открыть Аудиокниги
Категории
Открыть Журналы
Категории
Открыть Документы
Категории
x=[-1:0.1:1];
>> f=x.^2;
>> g=x.^3;
>> plot(x,f,'r:*')
>> xlabel('X')
>> ylabel('Y')
>> legend('f(x)')
>> xlabel('X')
>> ylabel('Y')
>> legend('g(x)')
0.5
Y
-0.2
0.4
0.3 -0.4
0.2 -0.6
0.1 -0.8
0 -1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
X X
II. b
figure(3)
>> hold on
>> plot(x,f,'r:*')
>> ylabel('Y')
>> legend('f(x)','g(x)')
II. c
subplot(3,1,1)
>> plot(x,f,'r:*')
>> xlabel('X')
>> ylabel('Y')
>> legend('f(x)')
>> subplot(3,1,2)
>> xlabel('X')
>> ylabel('Y')
>> legend('g(x)')
>> subplot(3,1,3)
>> hold on
>> plot(x,f,'r:*')
>> xlabel('X')
>> ylabel('Y')
>> legend('f(x)','g(x)')
Graficul functiei f(x)
1
f(x)
0.5
Y
0
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
X
Graficul functiei g(x)
1
g(x)
0
Y
-1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
X
Graficul functiei f(x) si g(x)
1
f(x)
g(x)
0
Y
-1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
X
>> subplot(1,3,1)
>> plot(x,f,'r:*')
>> xlabel('X')
>> ylabel('Y')
>> legend('f(x)')
>> subplot(1,3,2)
>> xlabel('X')
>> ylabel('Y')
legend('g(x)')
>> subplot(1,3,3)
>> hold on
>> plot(x,f,'r:*')
>> xlabel('X')
>> ylabel('Y')
>> legend('f(x)','g(x)')
Graficul functiei f(x) Graficul functiei g(x) Graficul functiei f(x) si g(x)
1 1 1
f(x) g(x) f(x)
0.9 0.8 0.8 g(x)
0.5 0 0
Y
0 -1 -1
-1 0 1 -1 0 1 -1 0 1
X X X
II. c 2
subplot(2,2,1)
>> plot(x,f,'r:*')
xlabel('X')
ylabel('Y')
legend('f(x)')
>> subplot(2,2,3)
>> plot (x,g,'b-^')
xlabel('X')
ylabel('Y')
legend('g(x)')
>> subplot(1,2,2)
>> hold on
plot(x,f,'r:*')
plot (x,g,'b-^')
xlabel('X')
ylabel('Y')
legend('f(x)','g(x)')
0.5 0.6
Y
0.4
0 0.2
-1 -0.5 0 0.5 1
X 0
Y
0
Y
-0.6
-0.5 -0.8
-1 -1
-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1
X X
subplot(2,2,1)
>> hold on
plot(x,f,'r:*')
plot (x,g,'b-^')
xlabel('X')
ylabel('Y')
legend('f(x)','g(x)')
>> subplot(2,1,1)
>> hold on
plot(x,f,'r:*')
plot (x,g,'b-^')
xlabel('X')
ylabel('Y')
legend('f(x)','g(x)')
>> subplot(2,2,3)
>> plot(x,f,'r:*')
xlabel('X')
ylabel('Y')
legend('f(x)')
>> subplot(2,2,4)
xlabel('X')
ylabel('Y')
legend('g(x)')
Graficul functiei f(x) si g(x)
1
f(x)
g(x)
0.5
0
Y
-0.5
-1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
X
Graficul functiei f(x) Graficul functiei g(x)
1 1
f(x) g(x)
0.5
0.5 0
Y
-0.5
0 -1
-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1
X X