Skip to content
Snippets Groups Projects
Commit 746bf195 authored by wactbprot's avatar wactbprot
Browse files

und jetzt alles als list() und ab in eine db

parent 579d1e8b
No related branches found
No related tags found
No related merge requests found
library(ggplot2) library(ggplot2)
### -------------------------------------------------------- ### --------------------------------------------------------
set <- list()
p.fill <- 44.6 # mbar p.fill <- 44.6 # mbar
M <- 100 # Anz. Messpunkte pro SZ M <- 100 # Anz. Messpunkte pro SZ
N <- 5 # Anz. der SZ N <- 5 # Anz. der SZ
p.mean <- 0.0 # mbar p.mean <- 0.0 # mbar
m.mean <- -1.8e-3 # mbar/s m.mean <- -1.8e-3 # mbar/s
t.between <- 5.0 t.between <- 5.0 # s
t.rand.sd.rel <- 1e-3 t.rand.sd.rel <- 1e-3 #
p.rand.sd.rel <- 1e-8 p.rand.sd.rel <- 1e-8
p.mean.sz <- rep(p.mean, N) # Druckmittelwert der SZ p.mean.sz <- rep(p.mean, N) # Druckmittelwert der SZ
m.sz <- rep(m.mean, N) # Ausgangssteigung der SZ m.sz <- rep(m.mean, N) # Ausgangssteigung der SZ
...@@ -62,7 +63,7 @@ for(i in 1:N){ ...@@ -62,7 +63,7 @@ for(i in 1:N){
c.i <- p.rand.mean - m.rand * t.rand.mean c.i <- p.rand.mean - m.rand * t.rand.mean
t.rand.0 <- (mean(p.rand.mean) - c.i)/ m.rand t.rand.0 <- (mean(p.rand.mean) - c.i)/ m.rand
Delta.t <- diff(t.rand.0) Delta.t.sd <- sd(diff(t.rand.0))
pt.df <- data.frame(p.new = as.vector(p.new), pt.df <- data.frame(p.new = as.vector(p.new),
t.new = as.vector(t.new), t.new = as.vector(t.new),
...@@ -72,5 +73,6 @@ ggplot(pt.df) + ...@@ -72,5 +73,6 @@ ggplot(pt.df) +
geom_point(aes(x = t.new, y = p.new), color='black') + geom_point(aes(x = t.new, y = p.new), color='black') +
geom_point(aes(x = t.rand, y = p.rand), color='red') + geom_point(aes(x = t.rand, y = p.rand), color='red') +
geom_abline(aes(intercept = c.rand, slope = m.rand), color='red') + geom_abline(aes(intercept = c.rand, slope = m.rand), color='red') +
geom_vline(xintercept = t.rand.0) + geom_vline(xintercept = t.rand.0, linetype = "longdash") +
geom_point(aes(y = p.rand.mean, x = t.rand.mean), color="black", size=4) +
ggtitle("dp vs. dt") ggtitle("dp vs. dt")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment