This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Homework 11 - This script performs the power method to approximate the | |
% eigenvalues. | |
function [x,vv,k] = Power(A,v0,tol) | |
%A = [1 4 5;4 -3 0;5 0 7]; | |
%v0 = sqrt(3)*ones(1,3); | |
l = 0; | |
k = 1; | |
v = v0'; | |
while(1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Problem 4 - 2nd Order Predictor-Corrector for [0-1] of e^2t | |
clear all | |
close all | |
p=1; | |
for h = [0.2,0.2]; | |
tfinal = 1; | |
y0 = 1; | |
nmax = tfinal/h; | |
t = 0:h:tfinal; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Problem 3a - Eulers Method for 0-1 of e^2t | |
clear all | |
close all | |
plotnum=1; | |
for h = [0.1,0.05,0.001]; | |
tfinal = 1; | |
y0 = 1; | |
nmax = tfinal/h; | |
t = 0:h:tfinal; |