718282)
log Menghitung logaritma natural (ln) suatu bilangan
Sqrt Menghitung akar pangkat 2 dari suatu bilangan
Ceil Membulatkan bilangan ke bilangan bulat terdekat menuju plus tak berhingga.
Fix Membulatkan bilangan ke bilangan bulat terdekat menuju nol..
Floor Membulatkan bilangan ke bilangan bulat terdekat menuju minus tak berhingga.
1. Penjumlahan //aritmatika
Tulis di editor
echoon
formatshort
'5*x + 7*y + 3*z = 12'
'3*x - 5*y + 2*z = 10'
'2*x - 7*y + 6*z = -5'
[x, y, z]= solve ('5*x + 7*y + 3*z = 12', '3*x - 5*y + 2*z = 10', '2*x- 7*y
+ 6*z = -5')
echooff
Di command
>>pit
Hasilnya
format short
'5*x + 7*y + 3*z = 12'
ans =
5*x + 7*y + 3*z = 12
ans =
ans =
[x, y, z]= solve ('5*x + 7*y + 3*z = 12', '3*x - 5*y + 2*z = 10', '2*x- 7*y + 6*z = -5')
x=
967/211
y=
-77/211
z=
-588/211
echo off
hasil :
format short
ans =
1.7845
phi pada matlab = 180 . sehingga jika ada soal sin 90 , maka sin (pi/2)
3. Grafik
Di editor
echoon
x = [-15 : 0.1 : 15];
y = [-2500 : 0.1 : 2000];
plot(x, sin(x)*1000)
% Put a title on the figure.
title('TigaGrafik')
holdon
x = [-15 : 15];
y = [-2500 : 2000];
plot(x, x.^3)
holdon
X = [-15 -10 -5 0 5 10 15];
Y = [500 -500 500 -500 500 -500 500];
plot (X,Y)
holdoff
pake titik kalo untuk pembagian , perkalian dan pangkat
di command
>>gian5
Hasilnya
4. Diff
SOAL DIFERENSIAL
tulis di editor
echoon
%Persamaandiferensial
'dy/dx = exp^x + 5*x^2 - 2x^-1';
echooff
symsx;
%Turunannya (y=f(x))
f= inline('exp(x) + 5*x^2 - 2*x^-1','x');
diff(f(x))
(f(2))
echooff
tulis di command
>> gian4
hasilnya
%Persamaandiferensial
ans =
26.3891