search for: timesteps

Displaying 20 results from an estimated 34 matches for "timesteps".

2010 Jul 09
3
apply is slower than for loop?
...ly actually takes a significantly longer than a for loop. Am I missing something? It doesn't matter much if I do column wise calculations rather than row wise ## Example of how apply is SLOWER than for loop: #rm(list=ls()) ## DEFINE VARIABLES mu=0.05 ; sigma=0.20 ; dt=.25 ; T=50 ; sims=1e5 timesteps = T/dt ## MAKE PHI AND DS phi = matrix(rnorm(timesteps*sims), nrow=sims, ncol=timesteps) ds = mu*dt + sigma * sqrt(dt) * phi ## USE APPLY TO CALCULATE ROWWISE CUMULATIVE PRODUCT system.time(y1 <- apply(1+ds, 1, cumprod)) ## UNTRANSFORM Y1, BECAUSE ROW APPLY FLIPS THE MATRIX y1=t(y1) ## USE FO...
2017 Nov 29
1
DeSolve Package and Moving Average
...timestep of the model. I.e. When running the model for the first time, 10000 is used, running it for the next time the total sales value of the first timestep is used. Since only one timestep exists, this is logical. Yet I would expect the movavg function to produce a new value in each of the 120 timesteps, as it is the case with all other flow, stock and aux calculations as well. It would be great if you could help me with fixing this problem. Many thanks in advance! Yours, Jan [[alternative HTML version deleted]]
2007 Feb 20
2
scaler plugin fixes
Hi I think this is mostly a question of preference for my part, but I think it would give an overall better quality feel. What I'm talking about is mostly the movement it uses. As I've come to understand, it uses velocity and direction, and a target point. This means that it updates it velocity and direction every X seconds (timestep), and gives it the possibility to be
2012 Feb 03
3
[fields] image.plot abends with NAs in image.plot.info
summary: image.plot-ing two sets of netCDF data, with the second derived from the first. First plots to PDF as expected (title, data, legend). Second plots the data and title, but abends before drawing the legend, with > Error in if (del == 0 && to == 0) return(to) : > missing value where TRUE/FALSE needed > Calls: plot.layers.for.timestep -> image.plot -> seq ->
2011 Dec 12
2
i can't read large NETCDF file like CRU
i use library(ncdf) to read this file as follow library(ncdf) sst.nc = open.ncdf(title) lonall = get.var.ncdf(sst.nc,'lon') latall = get.var.ncdf(sst.nc,'lat') precip = get.var.ncdf(sst.nc,'pre') close(sst.nc) if i use this method my pc freeze and not respond until i restart it is there -- View this message in context:
2013 Apr 13
0
help on smoothing volatility surface..
...smooth each expiration's line then interpolate.... ?? library(RQuantLib) library(quantmod) library(rgl) library(akima) library(ggplot2) library(plyr) GetIV <- function(type, value, underlying, strike,dividendYield, riskFreeRate, maturity, volatility, timeSteps=150, gridPoints=151) { AmericanOptionImpliedVolatility(type, value, underlying, strike,dividendYield, riskFreeRate, maturity, volatility, timeSteps=150, gridPoints=151)$impliedVol } GetDelta <- function(type, underlyi...
2010 May 18
1
Compiz 8.6 - suse 11.0 1-2 rows pixilation at top of screen on kbd rotate
Listmates, This is no biggie, 8.6 is working well so far. However, I do notice 1-2 lines of pixelization at the top of the screen on keyboard rotate. I know this hasn't been there since the 0.5.6-0.6 days when compiz was first released for opensuse years ago. It wasn't there up through 8.2. The gpu is the radeon X1200 using the fglrx-legacy driver. Looking at the screenshot it actually
2013 Mar 07
5
multiple plots and looping assistance requested (revised codes)
...5 #2? 12.3 #3? 11.4 Suppose I use names(temper) instead of seq_along(temper) pdf("irucka.pdf") ?lapply(names(temper),function(i) {plot(as.matrix(temper[[i]][1]),as.matrix(temper[[i]][2]),main="Fluxmaster versus EGRET/WRTDS \n Seasonal FLux Sum",sub=i,xlab="Calendar Year Timesteps",ylab="Total Flux (kg/season)"); lines(temper[[i]][1]); lines(temper[[i]][2])}) dev.off() which may not be the one you wanted. A.K. ________________________________ From: Irucka Embry <iruckaE at mail2world.com> To: smartpink111 at yahoo.com Sent: Wednesday, March 6, 2013 9:...
2000 Aug 29
1
Newbie question: Linear regression with error bars.
Hello guys, I am a total newbie on R, having downloaded it, read the documentation and started playing with it right now. My general question is what 'lr' model can be used for doing a linear regression on points that have a variance associated with them (ie. Monte Carlo simulation results). Actually my Data sets look like: Timestep Energy Variance_of_the_Energy 0.0005 -14.876840
2003 Nov 25
3
plot mean + S.E. over time
...after having lost years of my life handling data with a popular, rather wide-spread spreadsheet-software. Now I want to plot the results of many runs of my simulation over time, so that the means +/- Standard error are on the y-axis, and time on the x-axis. I have tried 'boxplot', with timesteps as the grouping variable, but did not manage to replace quartils by S.E. Then, with 'plot' I do not know how to handle the data of 100 runs for a given time to produce the mean and S.E. Are there any suggestions? Any help would be appreciated! Cheers, Jan -- _________________________...
2013 Mar 29
1
multiple plots and looping assistance requested (single plot)
...mns subset temp3<-temp1[lapply(temp1,length)==3] temp3New<-temp3[sapply(temp3,is.data.frame)] pdf("Irucka.pdf") lapply(names(temp3New),function(i) {x<-temp3New[[i]]; matplot(x[,1],x[,-1],type="n",lty=1,sub=i,main="Seasonal Flux Sum", xlab="Calendar Year Timesteps",ylab="Total Flux (kg/season)"); matlines(x[,1],x[,-1],type="l",lty=1:2,lwd=1,col=1:2)}) dev.off() A.K. ________________________________ From: Irucka Embry <iruckaE at mail2world.com> To: smartpink111 at yahoo.com Sent: Friday, March 29, 2013 5:41 PM Subject: Re...
2011 Oct 17
1
compressing/reducing data for plot
...8e-001 5.224478627497e-006 1.000000000000e-009 7.218354344368e-001 5.224477718002e-006 2.000000000000e-009 7.218354344368e-001 5.224477718002e-006 4.000108361244e-009 7.218354344368e-001 5.224478627497e-006 8.000325083733e-009 7.218354344368e-001 5.224478627497e-006 as the timesteps are small, each simulation results in a lot of data, about 1e5 data points per simulation. Now I want to plot this data. If I do this with a simple plot(x=data$Time, y=data$V, type="l") the resulting file (I plot into postscript files) is huge and takes a long time to render, since R c...
2012 Jan 05
1
[ncdf] programmatically copying a netCDF file
How to programmatically (i.e., without no or minimal handcoding) copy a netCDF file? (Without calling > system("cp whatever wherever") :-) Why I ask: I need to "do surgery" on a large netCDF file (technically an I/O API file which uses netCDF). My group believes a data-assimilation error caused a data variable to be corrupted in a certain way, so I'm going to
2010 Mar 12
1
Exporting animation of a series of plots
Hi All, Thank you in advance for your help. I made an agent-based model in R and I plot it using image() each timestep creating a nice animation. I can't seem to find in any of the R codes a means to export the series of images so that they can be played as a movie or animation. Thank you again. Flana
2007 Jun 24
1
movement backend
Hi I'm just wondering what the status is on the new movement architecture that I think David mentioned a few months ago. The point was to get more predictable and accurate movement in the plugins. Since the current method recomputes speed and direction every "timestep". So the movemnt is actually computed on the fly, instead of having a predetermined path which is
2008 May 28
1
Writing intermediate analysis to disk
Is there a way to write and analysis to disk and then reconstruct the whole thing back into an object. wavCWT() #wmtsa package I am running out of memory on my computer and I was wondering if there was a way to iterate through this process (as it is an iterative process anyway- it just stores the whole thing to memory). Or is there a way to set the scale that I want to look at so that wavCWT
2018 Apr 18
2
Event-triggered change in value with a time-delay
..., there is a time delay (delay) before the parameter shifts values. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Toy model: # define parameters P <- c(m = 10, R_1 = 0.5, R_2 = 0.1, D_0 = 50, D_T = 5, delay = 3 ) # set initial values y_0 <- c(D = 0, Y = 1) # set timesteps times <- seq(0, 100, length = 101) # define function bit <- function(t,y,parms){ with(as.list(c(parms,y)),{ # How I would implement the change if there was no time delay # m <- ifelse(D>=D_T, m*.68, m) # Option 1: nested if statements with time delay # if (D >=...
2016 Apr 06
1
Extracting windows from time series
Dear R Users Thanks for the help in advance and lets get straight to the problem: I have a 400 year long temperature time series and I am looking for decades that show a linear trend decrease of approximately -0.1 Kelvin or degrees. --> What I would like to program: A loop/function / command line that prints the values of all the trends (can also be overlapping) into a matrix that could have
2010 May 19
2
Compiz 8.6 on openSuSE 11.0 -- Success! But need help with a few issues.
Dominique, cc: compiz, Dominique, you wanted the feedback, and List, I need your help. I have installed and fully configured (kicked the tires) on compiz 8.6 on openSuSE 11.0 and on balance it is great. There are a few weird things going on. Most notably, the number of options in ccsm that now uncheck themselves. In the past (compiz 0.5.6 - 0.8.2) there may have been one or two that would stick
2001 Feb 22
2
Problem with tcltk listbox
Hi! I've got two problems with listboxes and selection: I created a listbox, no problem. Then I bind the Button-1 of the mouse to the listbox to start some things by pressing the mousebutton. The proiblem is that as I click a item of the listbox this error occured: Error in .Tcl(.Tcl.args(...)) : [tcl] bad listbox index "": must be active, anchor, end, @x,y, or a number. Repaeting