search for: gaussian2d

Displaying 1 result from an estimated 1 matches for "gaussian2d".

2023 Nov 08
1
Problem in R code
...t on the topic "Urban Heat Island Pattern in India". To achieve the results I am applying a* two-dimensional Gaussian fit* on an LST raster of 1 km spatial resolution but I am facing two errors in the following code. library(raster) LST <- raster("D:/Celsius_Day/MOD_01.tif") gaussian2d <- function(x, y, mu_x, mu_y, sigma_x, sigma_y, amp) { exp(-((x - mu_x)^2/(2*sigma_x^2) + (y - mu_y)^2/(2*sigma_y^2)))*amp } #define a function for the sum of squared errors between the data and the Gaussian sse <- function(p) { mu_x <- p mu_y <- p sigma_x <- p sigma_y <- p amp...