Matrix erstellen

Puppilein

Mitglied
Hallo, bin mir nicht ganz sicher wie man eine Matrix erstellt.
habe eine 4x4 matrix und eine 4x1 matrix, also einen vektor.

das hier habe ich gemacht, kann man das so machen?

Java:
public class Test {

	public static void main(String args[]) {
		double[][] Matrix = {
	    { 1.0, -1.0, 0.0, 0.0},
        { -1.0, 2.0, -1.0, 0.0},
	    { 0.0, -1.0, 2.0, -1.0},
        { 0.0, 0.0, -1.0, 2.0}		
		
		};
	}
	
		public static void main1(String args[]) {
			double[][] Vektor = {
					{0.3},
					{0.2},
					{0.1},
					{0.0}
			};
	}	

}
 

Zurück
Oben