Documente Academic
Documente Profesional
Documente Cultură
1. S se calculeze: 125 3 14
1
.
6
>> 125+14^(1/3)+1/6
ans =
1.275768089308419e+02
f =
b + a*x
>> g=b*x+a
g =
a + b*x
>> f*g
ans =
(a + b*x)*(b + a*x)
2x 2 x 3 .
>> syms x f
>> f=sqrt(2*x^2+x+3)
f =
(2*x^2 + x + 3)^(1/2)
>> subs(f,2)
ans =
13^(1/2)
0
2 x y 3
15. S se rezolve sistemul de ecuaii
.
x 3 y 4
>> syms x y f g
>> f=2*x+y-3
f =
2*x + y - 3
>> g=x+3*y-4
g =
x + 3*y - 4
>> s=solve(f,g)
s =
x: [1x1 sym]
y: [1x1 sym]
>> s.x
ans =
1
>> s.y
ans =
1
1 2 1
1 0 1
>> A=[1 2 1; 2 0 1; 3 1 3]
A =
1
2
1
2
0
1
3
1
3
>> B=[1 0 1; 3 2 0; 1 1 3]
B =
1
0
1
3
2
0
1
1
3
>> A+B
ans =
2
2
2
5
2
1
4
2
6
>> A-B
ans =
0
2
0
-1
-2
1
2
0
0
>> A*B
ans =
8
5
4
3
1
5
9
5
12
>> A/B
ans =
-1.5714
0.5714
1.8571
0.1429
1.7143
0.2857
>> A\B
ans =
2.8000
1.6000
0.4000
-0.2000
-2.6000
-1.2000
>> A+2
ans =
3
4
3
4
2
3
5
3
5
>> B*3
ans =
3
0
3
9
6
0
3
3
9
>> C=[A B]
C =
1
2
1
2
0
1
3
1
3
>> D=[A;B]
D =
1
2
1
2
0
1
3
1
3
1
0
1
3
2
0
1
1
3
0.8571
-0.2857
0.4286
-1.0000
0
2.0000
1
3
1
0
2
1
1
0
3
1 2 1 0
3 4 1 8
. S se calculeze sumele pe coloane i suma
17. Fie matricea A
7 6 7 2
0 5 2 1
121
1.735 2.123 1
19.5
77
25
10
S se determine elementele de
18. Fie matricea M
14
0
992
4
78
99
34
.
5
78
.
2
M =
1.7350
2.1230
10.0000
19.5000
14.0000
0
78.0000
99.0000
4
>> D=diag(M)
D =
1.7350
19.5000
992.0000
78.2000
>> sum(D)
ans =
1.0914e+03
>> trace(M)
ans =
1.0914e+03
1.0000
77.0000
992.0000
34.5000
121.0000
25.0000
4.0000
78.2000
2x 2 x 3
pe intervalul de valori
>> x=-4:0.1:4;
>> y=sqrt(2*x.^2+x+3);
>> plot(x,y)
>>
>>
>>
>>
>>
>>
>>
hold on;
y=cos(x);
plot(x,y,'b');
title('Graficele functiilor sin si cos');
xlabel('Ox');
ylabel('Oy');
grid on;
22. Un cerc
function plotround
x0=390;
y0=423;
O=x0+i*y0;
d=20;
Z0=O+d;
thitar=0:10:360; %degree
rthitar=thitar*pi/180; %rad
lr=length(rthitar);
for di=1:lr
Z(di)=O+(Z0-O)*exp(i*rthitar(di));
end
pZ=[Z,Z(1)];
hold on;
plot(pZ,'ko-');
raw=[];
for k='D':4:'P'
sir=strcat(k,int2str(2),':',k,int2str(16))
% xx=uint8(k)-67;
raw_ = xlsread('C:\Apa.xlsx','Mangan',sir);
%[~, ~, raw0_1] = xlsread('C:\Apa.xlsx','Mangan','H2:H16');
%[~, ~, raw0_2] = xlsread('C:\Apa.xlsx','Mangan','L2:L16');
%[~, ~, raw0_3] = xlsread('C:\Apa.xlsx','Mangan','P2:P16');
raw = [raw raw_];
end
%% Create output variable
data = reshape([raw{:}],size(raw));
%%
M1
M2
M3
M4
10