So I have a text file, I read it into matlab using textscan
now I have a big array that I need to divide into smaller arrays or matrices so I can use the numbers given to solve static equilibrium equation and find support reactions.
This is my code for scanning it in
function [C]= read_input(input)
fid = fopen (input);
C = textscan(fid,'%s', 'Delimiter', '\n', 'CommentStyle', '#');
C = C{:};
fclose(fid);
I get this as my C array
ans =
'2 1'
'0.0 1.0 1.0'
'5.0 3.0 0.0'
'11.0 3.0 2.0 -9.0'
'0.1 3.0 1.0 1.0'
'0.0 1.0 1.0'
'10.0 4.0 -2.0 9.0'
'1.0 1.0 1.0'
'1.0 1.0 1.0'
'1.0 1.0 1.0'
'0.0 1.0 0.0'
'0.0 1.0 1.0'
'1.0 1.0 0.0'
'F 1.0 6.0 -7.0'
'F 4.0 1.0 1.1'
'F 1.0 8.0 1.0'
'F 6.0 1.0 0.0'
'M 0.0 9.0 1.0'
'M -1.0 1.0 0.0'
and this was my original txt file
number of external forces and moments
2 1
coordinates of the points at which external forces are applied
x y z
0.0 1.0 1.0 5.0 3.0 0.0
magnitude and direction of external forces
F dx dy dz
11.0 3.0 2.0 -9.0 0.1 3.0 1.0 1.0
location at which external couple moments are applied
x y z
0.0 1.0 1.0
magnitude and direction of external couple moments
M ux uy uz
10.0 4.0 -2.0 9.0
location of supports
x y z
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 1.0 0.0 0.0 1.0 1.0 1.0 1.0 0.0
type (F/M) and direction of reaction
type dx dy uz
F 1.0 6.0 -7.0 F 4.0 1.0 1.1 F 1.0 8.0 1.0 F 6.0 1.0 0.0 M 0.0 9.0 1.0 M -1.0 1.0 0.0