search for: my_convolv

Displaying 1 result from an estimated 1 matches for "my_convolv".

Did you mean: my_convolve
2006 Nov 29
1
An example of using rJava
...ed a few private emails asking for some simple demonstration of calling Java code from R using the rJava package (which can be installed directly inside R). Here is one example for convolving two vectors (an example in the R manual about linking C with R). First write a Java program public class my_convolve { public static double[] convolve(double[] a, double[] b) { int n1 = a.length; int n2 = b.length; int n3 = n1+n1-1; double[] c = new double[n3]; for(int i=0; i<n1; i++) for(int j=0; j<n2; j++) c[i+j] +=...