Dosen Pembimbing : Prof. Dr. Suhartono, M.Kom
Lembaga : Universitas Islam Negeri Maulana Malik Ibrahim Malang
Jurusan : Teknik Informatika
Fakultas : Sains dan Teknologi
library(mosaic)
## Registered S3 method overwritten by 'mosaic':
## method from
## fortify.SpatialPolygonsDataFrame ggplot2
##
## The 'mosaic' package masks several functions from core packages in order to add
## additional features. The original behavior of these functions should not be affected by this.
##
## Attaching package: 'mosaic'
## The following objects are masked from 'package:dplyr':
##
## count, do, tally
## The following object is masked from 'package:Matrix':
##
## mean
## The following object is masked from 'package:ggplot2':
##
## stat
## The following objects are masked from 'package:stats':
##
## binom.test, cor, cor.test, cov, fivenum, IQR, median, prop.test,
## quantile, sd, t.test, var
## The following objects are masked from 'package:base':
##
## max, mean, min, prod, range, sample, sum
library(mosaicCalc)
## Loading required package: mosaicCore
##
## Attaching package: 'mosaicCore'
## The following objects are masked from 'package:dplyr':
##
## count, tally
## Loading required package: Deriv
## Loading required package: Ryacas
##
## Attaching package: 'Ryacas'
## The following objects are masked from 'package:Matrix':
##
## diag, diag<-
## The following object is masked from 'package:stats':
##
## integrate
## The following objects are masked from 'package:base':
##
## %*%, diag, diag<-, lower.tri, upper.tri
##
## Attaching package: 'mosaicCalc'
## The following object is masked from 'package:stats':
##
## D
Anda telah melihat cara memplot grafik fungsi dari satu variabel, misalnya:
slice_plot(
95 - 73*exp(-.2*t) ~ t,
domain(t = 0:20) )
Pelajaran ini adalah tentang merencanakan fungsi dari dua variabel. Untuk sebagian besar, format yang digunakan adalah contour plot .
Anda gunakan contour_plot()untuk memplot dengan dua variabel input. Anda perlu membuat daftar dua variabel di sebelah kanan +tanda, dan Anda perlu memberikan rentang untuk masing-masing variabel. Sebagai contoh:
contour_plot(
sin(2*pi*t/10)*exp(-.2*x) ~ t & x,
domain(t = range(0,20), x = range(0,10)))
Kadang-kadang, orang ingin melihat fungsi sebagai permukaan , diplot dalam 3 dimensi. Anda bisa membuat komputer menampilkan plot perspektif 3 dimensi dengan menggunakan interactive_plot()fungsi. Seperti yang akan Anda lihat dengan mengarahkan mouse di sekitar plot, ini interaktif.
interactive_plot(
sin(2*pi*t/10)*exp(-.5*x) ~ t & x,
domain(t = 0:20, x = 0:10))
Sangat sulit untuk membaca nilai kuantitatif dari surface plot — contour plots jauh lebih berguna untuk itu. Di sisi lain, orang tampaknya memiliki intuisi yang kuat tentang bentuk surfaces. Mampu menerjemahkan dalam pikiran Anda dari contours to surfaces (dan sebaliknya ) adalah keterampilan yang berharga.