Dear All,

please help with the following problem:

I have


t <-seq(0,24,by=6)
a <-600
g <-0.05
b <-a*exp(-g*t)
  
I would like to establish a vector called z (for example) based on b where the results are calculated as :

z <-c(a-b[1],b[1]-b[2],b[2]-b[3],b[3]-b[4],b[4]-b[5])

so the results are:

[1]   0.00000 155.50907 115.20395  85.34519  63.22527


as always your input is appreciated

Andras 
	[[alternative HTML version deleted]]

