Skip to content

Instantly share code, notes, and snippets.

% 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)
% 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;
% 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;