NIM : 220605110107
Universitas : Universitas Islam Negeri Maulana Malik Ibrahim Malang
Jurusan : Teknik Informatika
Fungsi deferensial dapat digunakan dalam bahasa R dengan format sebagai berikut
library(mosaicCalc)
## Loading required package: 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
## Loading required package: mosaicCore
##
## Attaching package: 'mosaicCore'
## The following objects are masked from 'package:dplyr':
##
## count, tally
##
## Attaching package: 'mosaicCalc'
## The following object is masked from 'package:stats':
##
## D
g<-D(x^2~x)
g(3)
## [1] 6
Pembuatan sebuah fungsi
my_function<-function(x){
return (x^2)
}
my_function
## function(x){
## return (x^2)
## }
Pengaplikasian fungsi(my_function) dalam diferensial bahasa R
g<-D(my_function(x)~x)
g(10)
## [1] 20
Aplikasi diferensial dalam bahasa R dengan fungsi berisi variabel dan trigonometri disertai dengan definiton variabel
s2 <- D(A * sin(2 * pi * t / P) + C ~ t)
s2( t=3, A=2, P=10, C=4 )
## [1] -0.3883222
Pembuatan grafik dengan slice_plot dalam pengaplikasian diferensial bahasa R denagn fungsi berisikan trigonometri dan variabel
slice_plot(s2(t, A=2, P=10, C=4) ~ t,
domain(t=range(0,20)))