This file contains hidden or 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
#library(odesolve) | |
#source("lotz.f.noise.R") | |
lotz.params <- list(dl = 10, | |
bt = 8/3, | |
ro = 28) | |
lotz.noise <- function(t, y,v,p=lotz.params){ | |
y <- y+rnorm(3,v) | |
dl <- p[['dl']] | |
ro <- p[['ro']] |
This file contains hidden or 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
library(animation) | |
#N <- 10 | |
tmax <- 1e4 | |
freq_ex <- tmax/100 | |
theta <- 0.5 | |
plotrange <- c(-1,1) | |
cols <- heat.colors(N) |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
""" | |
Created on Sat Apr 12 21:02:25 2014 | |
@author: xiangze | |
""" | |
import numpy as np | |
from sympy import * | |
from scipy import linalg, mat, dot |
This file contains hidden or 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
library(rjags) | |
alpha<-1/10. | |
beta<-1/10. | |
c<-6 | |
N <- 500 | |
dt<-0.1 | |
sig<-1e-4 | |
itenum<-500000 |
This file contains hidden or 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
library(rjags) | |
alpha<-1/10. | |
beta<-1/10. | |
c0<-6 | |
N <- 500 | |
dt<-0.1 | |
sig<-1e-4 | |
itenum<-200000 |
This file contains hidden or 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
#library(parallel) | |
#THe model is from Stan User's Guide and Reference Manual | |
#https://github.com/stan-dev/stan/releases/download/v2.0.1/stan-reference-2.0.1.pdf | |
library(rstan) | |
model <- " | |
data { | |
int<lower=0> N; // number of data points | |
int<lower=1> D; // number of dimensions | |
int<lower=1> K; // number of clusters |
This file contains hidden or 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
D <- 2 | |
tmax <- 100 | |
dt <- 0.1 | |
v <- 0.4 | |
m <- 1 | |
a <- c(1,1) | |
r <- 0.3 | |
potential <- function(x){ |
This file contains hidden or 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
library(rstan) | |
model <- " | |
data { | |
int<lower=2> K; | |
int<lower=0> N; | |
int<lower=1> D; | |
int<lower=1,upper=K> y[N]; |
This file contains hidden or 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
library(rstan) | |
model <- " | |
data { | |
int<lower=0> N; // number of data points | |
int<lower=1> D; // number of dimensions | |
real<lower=0,upper=1> param[D]; | |
} |
This file contains hidden or 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
`define N (64) | |
`define N1 (63) | |
module SRM596_Div1( | |
input clk, | |
input rstn, | |
input [31:0] indata, | |
input wenable, | |
output reg [12:0] answer, | |
output reg ans_enable |
OlderNewer