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

📄 readme.txt

📁 jacobi algorithm matlab code
💻 TXT
字号:
Author: Dawn Finney (gth683e)
MATH 2605: Calculus III for CS
Computer Project#4: Jacobi Algorithm READ ME



EXECUTION:
GENERATING MATRICES AND PLOTTING 
		There are 2 different ways to execute the file that generates 10 random matrices,
 		diagonalizes them and then plots them:

	1. In the command window, call:
		testJacobiSameMatrices()
	2. Open testJacobiSameMatrices.m and press F5. 
	Regardless of which method you use, the function will print the matrices (original and 
	diagonalized) to the command window (see NOTES 3) and plot the specified points to 2 
	different figures (see NOTES 1 & 2). It also prints the average iterations it took for each 
	algorithm.


RUN THROUGH THE ALGORITHM STEP BY STEP
	If you want to test each of the algorithms individually, you can call:
	

- Quick Tutorial: Defining your own 5x5 matrix in Matlab
	yourMatrix = [x x x x x; x x x x x; x x x x x; x x x x x; x x x x x];
	yourMatrix = [x x x x x; 
         		      x x x x x; 
                     	      x x x x x; 
                                  x x x x x; 
                                  x x x x x];
	yourMatrix = [x, x, x, x, x; x, x, x, x, x; x, x, x, x, x; x, x, x, x, x; x, x, x, x, x];
		where x is any value
	Any one of the ways stated above is legal in Matlab and will create the same matrix.


- For a random matrix using the jacobi WITH sorting method
	The first time type:
 		[D, bk, k, A] = jacobi([], 0, [])
	Each time after that, type:
		[D, bk, k, A] = jacobi(D, k, A)


- Diagonalizing a matrix you specify using the jacobi WITH sorting method
	The first time type:
		 [D, bk, k, A] = jacobi(yourMatrix, 0, [])
	Each time after that, type:
		[D, bk, k, A] = jacobi(D, k, A)
	
	
- For a random matrix using the jacobi WITHOUT sorting method
	The first time type:
 		[D, bk, k, A] = jacobiNoMax([], 0, [])
	Each time after that, type:
		[D, bk, k, A] = jacobiNoMax(D, k, A)
	

	Diagonalizing a matrix you specify using the jacobi WITHOUT sorting method
	The first time type:
 		[D, bk, k, A] = jacobiNoMax(yourMatrix, 0, [])
	Each time after that, type:
		[D, bk, k, A] = jacobiNoMax(D, k, A)

NOTES:
1. Matlab likes to graph the legend for the plots right on top of the last plot for some reason 
    for a better look just drag the legend to the side

2. The plots may first appear in a small window depending on your settings. For a closer look, 
    I suggest maximizing your window rather than trying to zoom in. 

3. Some of the diagonalized matrices may seem like they contain negative zeros. The negative 
    zeros are actually very small negative numbers close to zero. So even though elements on 
    the off-diagonal may seem to be 0 or -0 they are not actually 0, but numbers very close to 0. 
    That is why the value of off() is not 0, but a really small number.

⌨️ 快捷键说明

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