This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Input 1: a vector of n probabilities each 0 < p < 1 such that sum of all p = k | |
# Input 2: k - integer | |
# Output: all possible products of Pi where k of Pi are selected as such, the other n-k as (1-Pi) | |
# Run as: awk -f sampling.R | |
BEGIN { | |
n = 5; | |
k = 2; | |
p[1] = 0.15; | |
p[2] = 0.22; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dohodki <- c(15,18,22,23,24, | |
22,25,15,15,14, | |
18,22,15,19,21, | |
23,15,14,17,18, | |
23,15,26,18,14, | |
12,15,11,10,8, | |
26,12,23,15,18, | |
19,17,15,20,10, | |
15,14,18,19,20, | |
14,18,10,12,23, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\usepackage{tkz-fct} | |
\usetikzlibrary{intersections} | |
\begin{document} | |
\tikzset{ | |
name plot/.style={every path/.style={name path global=#1}} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setup | |
library(ggplot2) | |
library(grid) | |
library(gridExtra) | |
# Rectangle | |
n <- 500 | |
x = runif(n, -1, 1) | |
y = runif(n, -0.25, 0.25) | |
df <- data.frame(x = x, y = y) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear all; clc | |
a=1; | |
b=0.1; | |
w=1; | |
t=linspace(0,5*pi,500); | |
x=a*cos(w*t); | |
y=a*sin(w*t); |
NewerOlder