From: Gopi on
Hi,

the sample wavelet function in matlab works fine.. the same with jave
builder results with errors.

main_m.m

function [A5,outlier]=main_m(vp)
% i/p - VP is list double array
% o/p - A5 is two dimensional numeric arry
% o/p - outlier is boolean value

sample java code..
public static void main(String[] args)
{
MWNumericArray n = null; /* Stores input value */
Object[] result = null; /* Stores the result */
wavelet theWavelet = null
double[] x1 = {4.005, 4.004, 3.9953, 3.9732, 3.9583, 3.9417,
3.9307, 3.9176, 3.9154, 3.9154, 3.9154, 3.9154};
n = new MWNumericArray(x1, MWClassID.DOUBLE);
System.out.println("Input Values" + n.toString());

/* Create new wavlet object */
theWavelet = new wavelet();

result = theWavelet.main_m(2, n);
}
....

Error:

Input Values Columns 1 through 7

4.0050 4.0040 3.9953 3.9732 3.9583 3.9417
3.9307

Columns 8 through 12

3.9176 3.9154 3.9154 3.9154 3.9154
??? Index exceeds matrix dimensions.

Error in ==> wtbxmngr at 75

Error in ==> dwtmode at 158

Error in ==> dwt at 54

Error in ==> wavedec at 43

Error in ==> wdencmp at 95

Error in ==> main_m at 10

com.mathworks.toolbox.javabuilder.MWException: Index exceeds matrix
dimensions.Error in =>main_m.m at 10
at com.mathworks.toolbox.javabuilder.MWMCR._mclFeval(Native Method)
at com.mathworks.toolbox.javabuilder.MWMCR.access$000(MWMCR.java:17)
at com.mathworks.toolbox.javabuilder.MWMCR$2.run(MWMCR.java:104)
at
com.mathworks.toolbox.javabuilder.MCRThreadUtilities.runWhilePumpingEv
entQueue(MCRThreadUtilities.java:41)
at com.mathworks.toolbox.javabuilder.MWMCR.mclFeval(MWMCR.java:102)
at com.mathworks.toolbox.javabuilder.MWMCR.invoke(MWMCR.java:471)
at wavelet.wavelet.main_m(wavelet.java:330)
at GetWavelet.main(GetWavelet.java:34)
Exception: com.mathworks.toolbox.javabuilder.MWException: Index
exceeds matrix dimensions.Error in =>main_m.m at 10

---- end of error----

Can someone help me on this !!

thanks,
Gopi
From: Gopinath on
I couldnot figure out the error running the sample wavelet from
matlab.. not sure the problem with java builder..

has anyone experienced problems with javabuilder in calling recursive
functions. !!

Any help on this is appreciated.

thanks,
Gopi

Gopi wrote:
>
>
> Hi,
>
> the sample wavelet function in matlab works fine.. the same with
> jave
> builder results with errors.
>
> main_m.m
>
> function [A5,outlier]=main_m(vp)
> % i/p - VP is list double array
> % o/p - A5 is two dimensional numeric arry
> % o/p - outlier is boolean value
>
> sample java code..
> public static void main(String[] args)
> {
> MWNumericArray n = null; /* Stores input value */
> Object[] result = null; /* Stores the result */
> wavelet theWavelet = null
> double[] x1 = {4.005, 4.004, 3.9953, 3.9732, 3.9583, 3.9417,
> 3.9307, 3.9176, 3.9154, 3.9154, 3.9154, 3.9154};
> n = new MWNumericArray(x1, MWClassID.DOUBLE);
> System.out.println("Input Values" + n.toString());
>
> /* Create new wavlet object */
> theWavelet = new wavelet();
>
> result = theWavelet.main_m(2, n);
> }
> ...
>
> Error:
>
> Input Values Columns 1 through 7
>
> 4.0050 4.0040 3.9953 3.9732 3.9583 3.9417
> 3.9307
>
> Columns 8 through 12
>
> 3.9176 3.9154 3.9154 3.9154 3.9154
> ??? Index exceeds matrix dimensions.
>
> Error in ==> wtbxmngr at 75
>
> Error in ==> dwtmode at 158
>
> Error in ==> dwt at 54
>
> Error in ==> wavedec at 43
>
> Error in ==> wdencmp at 95
>
> Error in ==> main_m at 10
>
> com.mathworks.toolbox.javabuilder.MWException: Index exceeds matrix
> dimensions.Error in =>main_m.m at 10
> at com.mathworks.toolbox.javabuilder.MWMCR._mclFeval(Native
> Method)
> at
> com.mathworks.toolbox.javabuilder.MWMCR.access$000(MWMCR.java:17)
> at com.mathworks.toolbox.javabuilder.MWMCR$2.run(MWMCR.java:104)
> at
>
com.mathworks.toolbox.javabuilder.MCRThreadUtilities.runWhilePumping
> Ev
> entQueue(MCRThreadUtilities.java:41)
> at
> com.mathworks.toolbox.javabuilder.MWMCR.mclFeval(MWMCR.java:102)
> at com.mathworks.toolbox.javabuilder.MWMCR.invoke(MWMCR.java:471)
> at wavelet.wavelet.main_m(wavelet.java:330)
> at GetWavelet.main(GetWavelet.java:34)
> Exception: com.mathworks.toolbox.javabuilder.MWException: Index
> exceeds matrix dimensions.Error in =>main_m.m at 10
>
> ---- end of error----
>
> Can someone help me on this !!
>
> thanks,
> Gopi
 | 
Pages: 1
Prev: DDE in Matlab
Next: R2007a runtime problem