hydro:inghy:exchange
Dies ist eine alte Version des Dokuments!
Inhaltsverzeichnis
Ingenieurhydrologie Modellierung
Lineare Regression rechnen
- |Blaney-Criddle.r
#' --- #' title: "Lineae Regression" #' author: "C. Kuells" #' date: "9. Mai, 2015" #' --- x <- c(-2, -1, -0.8, -0.3, 0, 0.5, 0.6, 0.7, 1, 1.2) y <- c(1.9, 0.6, 0.5, 0.8, -0.4, -0.9, -0.7, -0.1, -1.7, -0.2) fm <- lm(y ~ x) #+ fig.width=5, fig.height=5 plot(x, y, xlim = c(-3, 3), ylim = c(-3, 3), pch = 19) fitted.values(fm) residuals(fm) #+ fig.width=5, fig.height=5 plot(x, y, xlim = c(-3, 3), ylim = c(-3, 3), pch = 19) abline(fm, col = "red")
Datein einlesen
wd <- getwd() setwd("C:\HydroPro\R+") klima <- read.csv(file="c:/HydroPro/R+/fuhlsbuettel.txt", header=TRUE, sep=";", na.string="-999") summary(klima) attach(klima)
Kontrollstrukturen
if (bed1 < eps) return(a1 + a2) else { return() }
for (i in 1:1000) { N[i] }
Erstes Modell
setwd("C:\\HydroPro\\R+") klima <- read.csv(file="fuhlsbuettel.txt", header=TRUE, sep=";") # Fehlwerte richtig einlesen summary(klima) attach(klima) N <- NIEDERSCHLAGSHOEHE Flaeche <- 640 # km2 A <- 0.08 # Abflusskoeffizient Va <- 10 # mm Anfangsverlust Q <- (N)*A*(Flaeche*1000000)*1/1000*1/86400 # Einheitenumwandlung Flaeche m2 -> km2, Volumen l-> qm, Zeit Tag -> Sekunde plot(Q, ylim = c(0, 10))
/usr/www/users/uhydro/doku/data/attic/hydro/inghy/exchange.1497279765.txt.gz · Zuletzt geändert: 2024/04/10 10:15 (Externe Bearbeitung)