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

📄 script.m

📁 jacobi algorithm matlab code
💻 M
字号:
%This script averages the iterations for the Jacobi algorithm with sorting 
%and without sorting for 100 matrices and also averages the difference
%between the two methods.

SortTotal = 0;
NoSortTotal = 0;
DifferenceTotal = 0;
for (i=1:100)
    [Sort,NoSort]=testJacobiSameMatrices2();
    SortTotal = SortTotal + Sort;
    NoSortTotal = NoSortTotal + NoSort;
    DifferenceTotal = DifferenceTotal + (abs(NoSort-Sort));
end
disp('Sort Average');
disp(SortTotal/100);
disp('No Sort Average');
disp(NoSortTotal/100);
disp('Difference Average');
disp(DifferenceTotal/100);

⌨️ 快捷键说明

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