Displaying 1 result from an estimated 1 matches for "spaso".
Did you mean:
paso
2010 Oct 08
2
R: Why this deosn't work?, matrix, rounding error?
Hello
Why this works:
ncota <- 1
nslope <- 29
resul <- matrix(rep(0,ncota*nslope*4),ncota*nslope,4)
But this doesn't?
ncota <- 1
sini <- 0.1; sfin <- 1.5; spaso <- 0.05; nslope <- 1+((sfin-sini)/spaso)
resul <- matrix(rep(0,ncota*nslope*4),ncota*nslope,4)
I guess the problem is that the division gives a noninteger number.
How can I get the second one work?
I need to create a zero matrix with its size calculated from a calculation.
cheers
--
Vi...