1. laborgyakorlat, házik megoldásai
Contents
clear all, close all
1. feladat
5/2*6*4
1+3+5/5+3+1
2^(3+5^2)
cos(15*pi/8)
atan(12)
ans =
60
ans =
9
ans =
268435456
ans =
0.9239
ans =
1.4877
2. feladat
r=1.2
K=r^2*pi, G=4*r^3/3
r =
1.2000
K =
4.5239
G =
2.3040
3. feladat
x=1:5
A=[x;x;x;x;x]
B=A'.^3
x =
1 2 3 4 5
A =
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
B =
1 1 1 1 1
8 8 8 8 8
27 27 27 27 27
64 64 64 64 64
125 125 125 125 125
4. feladat
r=1:0.5:4
m=2:3:20
Terfogat=[r;m;r.^2*pi.*m]'
r =
1.0000 1.5000 2.0000 2.5000 3.0000 3.5000 4.0000
m =
2 5 8 11 14 17 20
Terfogat =
1.0e+003 *
0.0010 0.0020 0.0063
0.0015 0.0050 0.0353
0.0020 0.0080 0.1005
0.0025 0.0110 0.2160
0.0030 0.0140 0.3958
0.0035 0.0170 0.6542
0.0040 0.0200 1.0053
5. feladat
x=10^8
y=sqrt(x^2+1)-x
yy=1/(sqrt(x^2+1)+x)
x =
100000000
y =
0
yy =
5.0000e-009