%script to plot time history results for node 20 (top of column)
%CEE 744 final project. Nasser M. Abbasi

%FRAME FORCES
%frame(%s)  station(%f) out(%s) case(%s) step(%s) stepNum(%f) P(%f) V2(%f) V3(%f)
%T(%f) M2(%f)  M3(%f)  S11(%f)  ptS11Max(%s) x2S11Max(%f) x3S11Max(%f)
%S11Min(%f) ptS11Min(%s)  x2S11Min(%f) x3S11Min(%f) frameElem(%s) elemStation(%f)

cd('g:/nabbasi/data/nabbasi_web_Page/my_courses/univ_wisconson_madison/spring_2013/CEE_744_advanced_structural_dynamics/HWs/HW4');
fid = fopen('final_station_zero_forces_no_header.txt');
format_string = '%s%f%s%s%s%f%f%f%f%f%f%f%f%s%f%f%f%s%f%f%s%f';
C=textscan(fid,format_string);
plot(C{6}(1:800),C{7}(1:800))
title('P vs. time, column 3, station 0');
xlabel('time (sec)');
ylabel('P (kips)');
grid


%JOINT DISP
%joint(%s)  output(%s) case(%s) step(%s) stepNum(%f) U1(%f) U2(%f) U3(%f)
%R1(%f) R2(%f)  R3(%f)

cd('g:/nabbasi/data/nabbasi_web_Page/my_courses/univ_wisconson_madison/spring_2013/CEE_744_advanced_structural_dynamics/HWs/HW4');

fid = fopen('node_20_final_displacement.txt');
format_string = '%s%s%s%s%f%f%f%f%f%f%f';
C=textscan(fid,format_string);
subplot(3,1,1);
plot(C{5}(1:800),C{8}(1:800))
title('U3 vs. time, column 3 (label 11), joint 20');
xlabel('time (sec)');
ylabel('U3 (ft)');
grid

subplot(3,1,2);
plot(C{5}(1:800),C{9}(1:800))
title('U2 vs. time, column 3 (label 11), joint 20');
xlabel('time (sec)');
ylabel('U2 (ft)');
grid

subplot(3,1,3);
plot(C{5}(1:800),C{10}(1:800))
title('U3 vs. time, column 3 (label 11), joint 20');
xlabel('time (sec)');
ylabel('U3 (ft)');
grid
