473,385 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Error in A SVD Program - Help Required

I've written the following program for what we discussed and I get a

Exception in thread "main" javax.vecmath.MismatchedSizeException:
GMatrix.SVD: d
imension mismatch with V matrix
at javax.vecmath.GMatrix.SVD(GMatrix.java:1521)
at SVDTest.main(SVDTest.java:41)

Can't see why myself? Any ideas?
import javax.vecmath.* ;

public class SVDTest {
public static void main (String[] args) {
GMatrix u,v,w ;

double[] aInput = { 0,1,0,1,0,0,0,0,0,-58,0,
0,0,0,0,0,1,0,1,0,-201,0,

0,1,1,1,0,0,0,0,0,-53,-53,
0,0,0,0,0,1,1,1,0,-52,-52,

0,0,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,

0,0,1,1,0,0,0,0,0,0,-156,
0,0,0,0,0,0,1,1,0,0,-44,

1,0,0,1,0,0,0,0,-263,0,0,
0,0,0,0,1,0,0,1,-193,0,0,

1,0,1,1,0,0,0,0,-259,0,-259,
0,0,0,0,1,0,1,1,-45,0,-45,
} ;

GMatrix a = new GMatrix(12,11, aInput) ;

u = new GMatrix(12,12) ;
v = new GMatrix(11,11) ;
w = new GMatrix(12,11) ;

a.SVD(u,v,w) ;

GVector alpha = new GVector(11) ;
double[] bInput = {58.,201.,53.,52.,159.,181.,156.,44.,263.,193.,259 .,45.} ;
GVector b = new GVector(bInput) ;

alpha.SVDBackSolve(u,v,w,b) ;

}


}
Jul 17 '05 #1
1 1908
>
GVector alpha = new GVector(11) ;
double[] bInput = {58.,201.,53.,52.,159.,181.,156.,44.,263.,193.,259 .,45.} ;
GVector b = new GVector(bInput) ;

alpha.SVDBackSolve(u,v,w,b) ;

}


}


bInput is an array with 12 elements, but GVector accepts only 11 elements...
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: WindAndWaves | last post by:
I am writing error handling procedures at the moment. Here are some questions: 1. Can you write a procedure that picks up any error and deals with it no matter where it happens in the database?...
6
by: Ken | last post by:
When running a program in the debugger, what would cause it to crash without any error messages? I get "The program has exited with code 0 (0x0)". The program is a MDI app with threading for...
5
by: rajavel | last post by:
Hi, Runtime Error occurs after occurs after you execute a program. Example is StackOverFlow, Invalid Pointer reference Compile Time Error - If this Error occurs you will not be able to...
0
by: HKSHK | last post by:
This list compares the error codes used in VB.NET 2003 with those used in VB6. Error Codes: ============ 3: This Error number is obsolete and no longer used. (Formerly: Return without GoSub)...
14
by: Akhil | last post by:
plz c d following code #include<stdio.h> void main() { int x=4,y=1; y=x++++; //gives error message lvalue required y=x++ + ++y;//no errors
0
by: roger23 | last post by:
I get this error C:\Program Files\MSBuild\Microsoft\WebDeployment\v8.0\Microsoft.WebDeployment.targets(526,9): error MSB6006: "aspnet_compiler.exe" exited with code 1. at the end of my build...
35
by: jeffc226 | last post by:
I'm interested in an idiom for handling errors in functions without using traditional nested ifs, because I think that can be very awkward and difficult to maintain, when the number of error checks...
25
by: Blasting Cap | last post by:
I keep getting errors that pop up when I am trying to convert an application from dotnet framework 1.1 to framework 2.0. The old project was saved in sourcesafe from Visual Studio 2003, and I have...
12
by: jonatan | last post by:
Hello All, I am making a program and need the grt_main.c but i try to compile have the error c1004.Please help me how to solve it? Thank you. --------------------Configuration: pre - Win32...
10
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.