You are on page 1of 3

1.

>> %8a
>> radius=15
radius =
15
>>
spheresurfacearea=4*pi*radius*
radius
spheresurfacearea =
2.8274e+003
>>
%spheresurfacearea=cubesurfa
cearea
>>
%cubesurfacearea=6*length*len
gth
>>
length=sqrt(spheresurfacearea/
6)
length =
21.7080
>> %units in cm
>> %8b
>>
spherevolume=(4/3)*pi*radius*r
adius*radius
spherevolume =
1.4137e+004
>>
%spherevolume=cubevolume
>>
%cubevolume=length*length*le
ngth
>>
length=nthroot(spherevolume,3
)
length =
24.1799
2.
>> %9a
>> %units in inches
>>
%spheresurfacearea=4*pi*radiu
s*radius
>> spheresurfacearea=200
spheresurfacearea =
200

>>
radius=sqrt((spheresurfacearea
/(4*pi)))
radius =
3.9894
>>
spherevolume=(4/3)*pi*radius^
3
spherevolume =
265.9615
>> %9b
>> volume=(4/3)*pi*(200/
(4*pi))^(3/2)
volume =
265.9615
3.
>> %13
>> xmax=(3*pi)/4
xmax =
2.3562
>> xmin=(pi/3)
xmin =
1.0472
>> (1/2)*(xmax-xmin)(1/4)*sin(2*(xmax-xmin))
ans =
0.5295
4.
>> %14
>> a=21
a=
21
>> b=45
b=
45
>> c=60
c=
60
>> (c^2-a^2-b^2)/(-2*a*b)
ans =
-0.6000
>> acosd(-0.6)
ans =
126.8699
>> %units in cm
>> y=acosd(-0.6)
y=

126.8699
>> angleC=y
angleC =
126.8699
>>
%a/sin(angleA)=c/sin(angleC)
>>
angleA=asind(a*sind(angleC)/c)
angleA =
16.2602
>>
%b/sin(angleB)=c/sin(angleC)
>>
angleB=asind(b*sind(angleC)/c)
angleB =
36.8699
>> angleA+angleB+angleC
ans =
180
5.
>> %15a
>> a=15
a=
15
>> b=35
b=
35
>> c=sqrt(a^2+b^2)
c=
38.0789
>> angle=acosd(b/c)
angle =
23.1986
>> %15b
>> angle=acosd(b/c)
angle =
23.1986
6.
>> %16
>> x=3
x=
3
>> y=-4
y=
-4
>> a=2
a=

2
>> b=7
b=
7
>> c=-10
c=
-10
>>
d=(abs(a*x+b*y+c)/sqrt(a*a+b*
b))
d=
4.3955
7.
>> %17
>> ceil(634/18)
ans =
36
8.
>> %18
>> CD_price=13.95
CD_price =
13.9500
>> Book_price=44.95
Book_price =
44.9500
>> format bank
>> 3*CD_price+5*Book_price
ans =
266.60
>>
taxable=3*CD_price+5*Book_pri
ce
taxable =
266.60
>> taxable+taxable*(5.75/100)
ans =
281.93
>> round(281.93)
ans =
282.00
9.
>> %19
>> (factorial(12))/
(factorial(5)*factorial(12-5))
ans =
792

10.
>>%22
>> help lcm
LCM Least common multiple.
LCM(A,B) is the least common
multiple of corresponding
elements of
A and B. The arrays A and B
must contain positive integers
and must be the same size
(or either can be scalar).
Class support for inputs A,B:
float: double, single
See also gcd.
Overloaded methods:
sym/lcm
Reference page in Help
browser
doc lcm
>> lcm(4,14)
ans =
28.00
>> lcm(8,42)
ans =
168.00

You might also like