-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathread_node_velocities_zlxxx.m
60 lines (49 loc) · 1.49 KB
/
read_node_velocities_zlxxx.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
% PERFORM 3D Binary Files Reader
% by Baris Erkus
%
% Please read the license before use.
%
% ver 0.01
% Basic reading
% 4 Node Results, Including Drifts
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 4.3 Node Velocities and Accelerations
% File name = ZLxxx, where xxx = analysis number.
% File type = binary direct access. Record length = 24 bytes (6 REAL*4).
% Dynamic analyses only
% Items 1-3 = H1, H2, V translational velocities.
% Items 4-6 = H1, H2, V translational accelerations.
% Rotational velocities and accelerations are not saved.
% The file contains NTIM+1 sets of NNODS records, where NTIM = no.
% of time steps (set 1 = state at start of analysis) and NNODS = no. of
% nodes.
% See *NODE : NODE COORDINATES in ECHO.txt for node numbers.
clear all; close all;
nanalysis = 8;
NDRFT = 88;
NNODS = 2786;
%
% for i = 1:nanalysis
% file_name{i} = ['ZL', num2str(i,'%03u')];
% end
%
% for i = 2:2
% fileID = fopen(file_name{i});
% eofile = 0;
%
% j = 1;
% while eofile == 0;
% for k=1:NNODS
% try
% nodres{i,1}.timset{j,1}.velacc(k,1:6) = fread(fileID, [1,6], 'real*4');
% catch
% eofile = 1;
% nodres{i,1}.timen = j-1;
% disp(['End of file reached. Time No: ', num2str(nodres{i,1}.timen)]);
% break;
% end
% end
% j = j+1;
% end
% fclose(fileID);
% end