clear clc clf raw = dlmread('atlanta.txt'); streets = raw(:,3:7); [rows,cols] = size(streets) colors = 'rgbkcmo'; for in = 1:rows x = streets(in,[1 3]); y = streets(in,[2 4]); col = streets(in,5); col(col < 1) = 7; col(col > 6) = 7; plot(x,y,colors(col)); hold on end tt = dlmread('ttimes.txt'); [rows,cols] = size(tt) oc = zeros(75,75); xc = oc; yc = oc; zc = oc; for in = 1:rows r = tt(in, 1); c = tt(in, 2); xc(r,c) = tt(in, 4); yc(r,c) = tt(in, 5); zc(r,c) = tt(in, 6); end surf(xc, yc, oc, zc) shading interp alpha(.5) colorbar grid on axis tight