Displaying 1 result from an estimated 1 matches for "odleg".
2009 Aug 23
2
difficult "for"
...similar - for (i
in sth : sth[length(sth)], k in sth_else : length(sth_else) ) - I'd like
to have two independent conditions in the same loop "for".
My secound question depend on program below. I'd like to write every result
in matrix but I also want to call my function "odleg" using vector "e3" -
exactly using values which are inside.
Can anyone please guide me, how to do that?
Thanks
## Function
odleg <- function (Xa,Xb,Ya,Yb){
d <- ((Xa-Xb)^2+(Ya-Yb)^2)^(1/2)
return (d)
}
# Database
ma=matrix(c(0.51139630,-0.12937287, 0.19530080,
0.0227...