search for: timestep

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

Did you mean: 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 F...
2017 Nov 29
1
DeSolve Package and Moving Average
...r, and store results in a data frame ResultsSimulation <- data.frame(ode(y=stocks, times=simtime, func = model, parms=auxs, method="euler")) [?]? My problem is, that the moving average (function: movavg) is only computed once and the same value is used in every 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...
2007 Feb 20
2
scaler plugin fixes
...ference 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 unaccuarte, like overshoot its goal and wobble a little. What my issue is though, is that even though you set timestep very low, it still is a little wobble present. What I would love would be another movement, like the one that is used in the animatio...
2012 Feb 03
3
[fields] image.plot abends with NAs in image.plot.info
...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 -> seq.default Debugging shows image.plot.info(...) is returning > Browse[2]> info > $xlim > [1] NA > $ylim > [1] NA > $zlim > [1] NA > $poly.grid > [1] FALSE details: (Hopefully the following is not too long-winded; I'm just tr...
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, underly...
2010 May 18
1
Compiz 8.6 - suse 11.0 1-2 rows pixilation at top of screen on kbd rotate
...ound the top rim of the cylinder, you can see mini white spots or triangles around the top edge: (46k) http://www.3111skyline.com/dl/img/ss/compiz/topPixelation-crop.jpg Also, initial looks at 8.6 it works great. The only issue I've stumbled on yet is the initial mouse rotate speed with 'Timestep = 1.0000'. If I set Timestep = 1.8, the old rotate speed is back, but it causes the over-rotation on keyboard rotate to next/previous side. A compromise value of Timestep = 1.2000 seem to work okay. Rotation is a bit slow, but you get 1-revolution with normal left/right mouse range of movement...
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.
...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 0.000670 0.001 -14.883960 0.000670 0.002 -14.887360 0.000700 0.05 -14.888730 0.000430 0.1 nan nan And what I want to do is to obtain the intercept of the best possible linear fit (weeding out outliers if necessary) but having the intercept with...
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: R...
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...
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 rendered. This gives the kinda wobbely feel of the scaler and similar plugins which some people (like me) think looks kind of unaccurate and non-professional. I think David mentioned a rewr...
2008 May 28
1
Writing intermediate analysis to disk
...s 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 can use something other than the default. In the documentation it says that the timestep or anything larger can be used. My time step is 1/15, but I can not use anything larger like 96 (which is one day of fifteen minute readings). thanks Stephen -- Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff...
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
...urface_temperature_MA10[10:394] + 1 # give all values in the TS a positive value. Like that ## I can easier extract the trends that fullfill the searched condition (decrease of 0.1 Kelvin) --> look next line Difference <- diff(Puls,lag=10) # x[(1+lag):n] - x[1:(n-lag)] --> time step 20 - timestep 10 for first calculation --> does that for whole time series ID <- c(1:375) melted_Difference <- melt(data.frame(Difference,ID),id.vars="ID") Hiatus <- subset(melted_Difference,value < -0.1) here the result : 23 23 Difference -0.1184901 24 24 Difference -0.1723032 25...
2010 May 19
2
Compiz 8.6 on openSuSE 11.0 -- Success! But need help with a few issues.
...sted to the compiz list) http://www.3111skyline.com/dl/img/ss/compiz/topPixelation-crop.jpg The slow rotation was noticed when I initiated the rotation, and swept my mouse all the way to it's normal left range of motion and only had 1/2 rotation of the cylinder. What I did was to adjust 'Timestep' to try and correct the issue and had some success. Details: Setting: Rotate Cube -> Timestep = 1.8 restores default rotation speed, but causes overrun on keyboard 'Next/Previous Desktop' (ctrl+alt+right/left) Setting 'Timestep = 1.2' is a workable compromise. T...
2001 Feb 22
2
Problem with tcltk listbox
..., end, @x,y, or a number. Repaeting the selection, all works well. This looks quite strang to me. The second thing is I have two listbox and I want to have the following action: When I select a item in listbox A the corresponding item of listbox B should be highlited. Doing this, the event is one timestep behind. For example selecting first element in A, no slection in B becaus eof the error mentioned above. Then selecting the second item in A , the first of B is highlited. Below the source fragments: prot.listbox<-tklistbox(anzeigeframe,exportselection="0",selectmode="browse&quo...