Tuesday, 6 October 2015

Membuat Kalkulator Fungsi Menggunakan Matlab

Assalamu’alaikum Wr Wb

Salam DM ...!
Kali ini kami akan berbagi ilmu kepada Anda tentang sintak membuat program aplikasi Kalkulator Fungsi menggunakan Matlab.
OK, langsung saja desain guide seperti berikut ini.


Tuliskan Scribs berikut di tombol “f(x) – g(x)
syms x
f=get(handles.edit3,'str');
g=get(handles.edit4,'str');
h=subs(f,x)-subs(g,x)
ezplot(h)
grid on
legend('Pengurangan: f(x)-g(x)');

Tuliskan Scribs berikut di tombol “f(x) + g(x)
syms x
f=get(handles.edit3,'str');
g=get(handles.edit4,'str');
h=subs(f,x)+subs(g,x)
ezplot(h)
grid on
legend('Penjumlahan: f(x)+g(x)');

Tuliskan Scribs berikut di tombol “g(x) – f(x)
syms x
f=get(handles.edit3,'str');
g=get(handles.edit4,'str');
h=subs(g,x)-subs(f,x)
ezplot(h)
grid on
legend('Pengurangan: g(x)-f(x)');

Tuliskan Scribs berikut di tombol “f(x) / g(x)
syms x
f=get(handles.edit3,'str');
g=get(handles.edit4,'str');
h=subs(f,x)/subs(g,x)
i=expand(h)
ezplot(i)
grid on
legend('Pembagian: f(x)/g(x)');

Tuliskan Scribs berikut di tombol “f(x) * g(x)
syms x
f=get(handles.edit3,'str');
g=get(handles.edit4,'str');
h=subs(f,x)*subs(g,x)
i=expand(h)
ezplot(i)
grid on
legend('Perkalian: f(x).g(x)');

Tuliskan Scribs berikut di tombol “g(x) / f(x)
syms x
f=get(handles.edit3,'str');
g=get(handles.edit4,'str');
h=subs(g,x)/subs(f,x)
i=expand(h)
ezplot(i)
grid on
legend('Pembagian: g(x)/f(x)');

Tuliskan Scribs berikut di tombol “f o g (x)
syms x
f=get(handles.edit3,'str');
g=get(handles.edit4,'str');
h=subs(subs(f,x),subs(g,x))
i=expand(h)
ezplot(i)
grid on
legend('Komposisi: f o g (x)');

Tuliskan Scribs berikut di tombol “g o f (x)
syms x
f=get(handles.edit3,'str');
g=get(handles.edit4,'str');
h=subs(subs(g,x),subs(f,x))
i=expand(h)
ezplot(i)
grid on
legend('Komposisi: g o f (x)');


Jika sudah selesai langsung saja F5 (running). Selamat mencoba ya semoga berhasil. OK saudaraku, mungkin ini saja yang bisa kami bagikan dulu semoga bermanfaat, amin. Sampai jumpa lagi. Salam DM...!

Wassalamu’alaikum Wr Wb.

No comments:
Write komentar

Syaharuddin. Theme images by MichaelJay. Powered by Blogger.

KOMENTAR ANDA