Nama: Muhammad Athourrahman
NIM: 230605110074
Prodi: Teknik Informatika
Fakultas: Fakultas Sains dan Teknologi
Universitas: UIN Maulana Malik Ibrahim Malang
Mata Kuliah: Kalkulus
Dosen Pengampu: Prof. Dr. Suhartono, M.Kom.
Gunakan fungsi R/mosaik Iterate(). Argumen pertama
adalah ekspresi gelombang yang mendefinisikan fungsi yang akan
diiterasi. Yang kedua adalah tebakan awal. Yang ketiga adalah jumlah
langkah iterasi. Contohnya:
library(mosaicCalc)
## Loading required package: mosaic
## Warning: package 'mosaic' was built under R version 4.3.2
## 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
## Warning: package 'mosaicCore' was built under R version 4.3.2
##
## 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
better <- makeFun((guess + x/guess)/2 ~ guess)
better(1, x=55)
## [1] 28
Iterate(better(guess, x=55) ~ guess, x0=1, n=5)
## n guess
## 1 0 1.000000
## 2 1 28.000000
## 3 2 14.982143
## 4 3 9.326590
## 5 4 7.611854
## 6 5 7.418713
Keluaran yang dihasilkan Iterate()berupa bingkai
data. Tebakan awal ada pada baris dengan n=0. Baris yang berurutan
memberikan keluaran, langkah demi langkah, dengan setiap langkah iterasi
baru.
Daftar Pustaka: Daniel, K. (2022). MOSAIC Calculus. Diakses pada tanggal 1 Desember 2023 dari https://www.mosaic-web.org/MOSAIC-Calculus/