⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 matrix_production.java

📁 用QR分解来求矩阵的全部特征值 包括:QR分解
💻 JAVA
字号:

public class Matrix_Production {
	public static double[][] Production(double[][] Q, double[][] R, int n){
		double[][] c=new double[5][5];
		int i,j,k;
		for(i=0;i<n;i++){
			for(j=0;j<n;j++){
				c[i][j]=0;
				for(k=0;k<n;k++)
					c[i][j]+=R[i][k]*Q[k][j];
			}			
		}
		return c;
	}
/*	public static void main(String[] args){
		double[][] Q={{0.18257418583505539,0.36514837167011077,0.5477225575051662,0.7302967433402214},
				{0.3337934209689225,0.48551770322752363,0.4551728467758033,-0.667586841937845},
				{-0.2879572396195815,0.7943168300617438,-0.5300082526331426,0.07233708434888038},
				{0.8788226481692433,2.220446049250313E-16,-0.4603356728505562,0.12554609259560623}};
		double[][] R={{5.477225575051662,6.390096504226939,5.8423739467217715,3.834057902536163},
				{-0.0,5.492419017761361,0.48551770322752325,2.4579333725893378},
				{0.0,-4.809843257404792E-17,0.7943168300617437,-0.7470195056797837},
				{0.0,2.7713330635983538E-17,5.551115123125783E-17,-0.8369739506373749}};
		double[][] C=Production(Q,R,4);
		for(int i=0;i<4;i++){
			for(int j=0;j<4;j++)
				System.out.print(C[i][j]+" ");
			System.out.println();
		}
	}*/

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -