Displaying 2 results from an estimated 2 matches for "fseedo".
Did you mean:
fseedi
2009 Jun 30
3
Matrix with random number
...build a matrix with random numbers, I have a function in C.
However, I have problems with the use of function in R.
Code to compile: R CMD SHLIB mat.f myrbeta.c -o func.so
Code in C.
#include <R.h>
#include <Rmath.h>
void F77_SUB(fseedi)(void){
GetRNGstate();
}
void F77_SUB(fseedo)(void){
PutRNGstate();
}
void F77_SUB(myrbeta)(double *px, double *pa, double *pb){
*px = rbeta(*pa,*pb);
}
Code in Fortran
subroutine mat(x,l,c)
integer l,c
double precision x(l,c)
integer i,j
do j = 1, c
do i = 1, l
call fseedi()
x(i,j) = ca...
2009 Feb 13
2
Generate random numbers in Fortran
Hi!!!
It would like to know if it exists a form to use the functions to
generate variates in FORTRAN with the same easiness I use that them in
C? Or not?
If yes. They would have some example? I would like to use the functions rbeta, rlnorm and others!
Sorry my english..rsrsrs
Thanks!!!
Fábio Mathias Corrêa University Federal of the Lavras - Brazil
Veja quais são os