close all; clc; clear; randn('seed',0); rand('seed',0); % Problem EPage 46 % r = 3:2:21; A = sprandsym(10,0.2,r); tic; chol(A); t_sparse = toc; tic; chol(full(A)); t_full = toc; disp( sprintf( 'time sparse= %10.6f, time full= %10.6f', t_sparse, t_full ) );