% CS 4220 (Spring 2010) Assignment 1
% Test Script P1. Checks out MatSquare.
clc
randn('seed',0)
n = 100;
% Set up a random H-matrix...
A = randn(n,n); 
F = randn(n,n); F = F + F'; 
G = randn(n,n); G = G + G';
H = [A F; G -A'];
% Square it two ways...
C = MatSquare(H);
C0 = H*H;
% Treat C0 as exact and display the relative error...
error = norm(C-C0,'fro')/norm(C0,'fro')
