Nama : Mutiara Arsyillah
NIM : 230605110132
Jurusan : Teknik Informatika
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
## The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
## which was just loaded, will retire in October 2023.
## Please refer to R-spatial evolution reports for details, especially
## https://r-spatial.org/r/2023/05/15/evolution4.html.
## It may be desirable to make the sf package available;
## package maintainers should consider adding sf to Suggests:.
## The sp package is now running under evolution status 2
## (status 2 uses the sf package in place of rgdal)
##
## Attaching package: 'mosaicCalc'
## The following object is masked from 'package:stats':
##
## D
library(r2symbols)
##
## Attaching package: 'r2symbols'
## The following object is masked from 'package:dplyr':
##
## sym
## The following object is masked from 'package:ggplot2':
##
## sym
library(EBImage)
Diferensiasi mengacu pada proses menemukan laju perubahan suatu fungsi terhadap salah satu variabelnya. Ini adalah konsep dasar dalam kalkulus dan sering dilambangkan dengan simbol ∂/∂χ atau dengan notasi singkat dy/dχ. Notasi-notasi:
• ƒ(χ) adalah sebuah fungsi
• ∂χƒ(χ) adalah turunan dari ƒ(χ)
• ∂χ∂χƒ(χ), turunan kedua dari ƒ(χ), biasanya ditulis lebih ringkas seperti ∂χχƒƒ(χ).
Ada beberapa contoh turunan standar.
Image <- readImage("C://Users/WINDOWS 11/Pictures/Turunan Standar.png")
print(Image)
## Image
## colorMode : Color
## storage.mode : double
## dim : 730 385 4
## frames.total : 4
## frames.render: 1
##
## imageData(object)[1:5,1:6,1]
## [,1] [,2] [,3] [,4] [,5] [,6]
## [1,] 1 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
## [2,] 1 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
## [3,] 1 0.9294118 0.6705882 0.6705882 0.6705882 0.6705882
## [4,] 1 0.7803922 0.0000000 0.3254902 0.3254902 0.3254902
## [5,] 1 0.7803922 0.2156863 1.0000000 1.0000000 1.0000000
Image1 <- Image + 0
par(mfrow= c(1,1))
plot(Image1)
Ada turunan orde ketiga, orde keempat, dan seterusnya, meskipun tidak sering digunakan. Ada jalan pintas untuk membuat turunan tingkat tinggi dengan menggunakan D()satu langkah. Di sisi kanan ekspresi tilde, cantumkan nama yang berkaitan secara berulang-ulang. Contohnya:
• Turunan kedua ∂χχsin(χ):
D(sin(x) ~ x & x)
## function (x)
## -sin(x)
## function (x)
## -sin(x)
• Turunan ketiga ∂χχχln(χ):
D(log(x) ~ x & x & x)
## function (x)
## 2/x^3
## function (x)
## 2/x^3
Contoh Penggunaan pada kehidupan:
Image <- readImage("C://Users/WINDOWS 11/Pictures/Contoh.png")
print(Image)
## Image
## colorMode : Color
## storage.mode : double
## dim : 1014 692 4
## frames.total : 4
## frames.render: 1
##
## imageData(object)[1:5,1:6,1]
## [,1] [,2] [,3] [,4] [,5] [,6]
## [1,] 1 1 1 1 1 1
## [2,] 1 1 1 1 1 1
## [3,] 1 1 1 1 1 1
## [4,] 1 1 1 1 1 1
## [5,] 1 1 1 1 1 1
Image1 <- Image + 0
par(mfrow= c(1,1))
plot(Image1)