Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function [] = spdTesting()
- [A, b] = spdGenerator(5);
- tic, [x, err, iter] = successiveOverRelaxation(A, b); timeSuccessiveOverRelaxation = toc;
- fprintf('SORtime: %1.3e sec.\n',timeSuccessiveOverRelaxation);
- fprintf('SORiter: %d. \n',iter);
- fprintf('SORerr : %1.3e\n', err );
- [A, b] = spdGenerator(10);
- tic, [x, err, iter] = successiveOverRelaxation(A, b); timeSuccessiveOverRelaxation = toc;
- fprintf('SORtime: %1.3e sec.\n',timeSuccessiveOverRelaxation);
- fprintf('SORiter: %d. \n',iter);
- fprintf('SORerr : %1.3e\n', err );
- [A, b] = spdGenerator(50);
- tic, [x, err, iter] = successiveOverRelaxation(A, b); timeSuccessiveOverRelaxation = toc;
- fprintf('SORtime: %1.3e sec.\n',timeSuccessiveOverRelaxation);
- fprintf('SORiter: %d. \n',iter);
- fprintf('SORerr : %1.3e\n', err );
- [A, b] = spdGenerator(100);
- tic, [x, err, iter] = successiveOverRelaxation(A, b); timeSuccessiveOverRelaxation = toc;
- fprintf('SORtime: %1.3e sec.\n',timeSuccessiveOverRelaxation);
- fprintf('SORiter: %d. \n',iter);
- fprintf('SORerr : %1.3e\n', err );
- [A, b] = spdGenerator(500);
- tic, [x, err, iter] = successiveOverRelaxation(A, b); timeSuccessiveOverRelaxation = toc;
- fprintf('SORtime: %1.3e sec.\n',timeSuccessiveOverRelaxation);
- fprintf('SORiter: %d. \n',iter);
- fprintf('SORerr : %1.3e\n', err );
- [A, b] = spdGenerator(1000);
- tic, [x, err, iter] = successiveOverRelaxation(A, b); timeSuccessiveOverRelaxation = toc;
- fprintf('SORtime: %1.3e sec.\n',timeSuccessiveOverRelaxation);
- fprintf('SORiter: %d. \n',iter);
- fprintf('SORerr : %1.3e\n', err );
- [A, b] = spdGenerator(1500);
- tic, [x, err, iter] = successiveOverRelaxation(A, b); timeSuccessiveOverRelaxation = toc;
- fprintf('SORtime: %1.3e sec.\n',timeSuccessiveOverRelaxation);
- fprintf('SORiter: %d. \n',iter)
- [A, b] = spdGenerator(2000);
- tic, [x, err, iter] = successiveOverRelaxation(A, b); timeSuccessiveOverRelaxation = toc;
- fprintf('SORtime: %1.3e sec.\n',timeSuccessiveOverRelaxation);
- fprintf('SORiter: %d. \n',iter);
- fprintf('SORerr : %1.3e\n', err );
- [A, b] = spdGenerator(2500);
- tic, [x, err, iter] = successiveOverRelaxation(A, b); timeSuccessiveOverRelaxation = toc;
- fprintf('SORtime: %1.3e sec.\n',timeSuccessiveOverRelaxation);
- fprintf('SORiter: %d. \n',iter);
- fprintf('SORerr : %1.3e\n', err );
- [A, b] = spdGenerator(3000);
- tic, [x, err, iter] = successiveOverRelaxation(A, b); timeSuccessiveOverRelaxation = toc;
- fprintf('SORtime: %1.3e sec.\n',timeSuccessiveOverRelaxation);
- fprintf('SORiter: %d. \n',iter);
- fprintf('SORerr : %1.3e\n', err );
Add Comment
Please, Sign In to add comment