I have this data from an input file below I have separated them by blocks the first block (rows 1 through 7) is my node block where column 4 are flags. When there is a 0 that means that the value in column 4 is a force and when there is a 1 that means the value in column 4 is a displacement.
1 3.0 0 02 2.0 0 03 0.5 1 0.0014 0.5 0 50005 4.0 0 06 8.25 1 07 6.5 0 -2000
Right now I have this Code:
X = NodeBlock(:,3) if X == 0 U = NodeBlock(:,X) else X == 1 F = NodeBlock(:,X) end
and its not working right, I just want it to compute that if X (the values in column 3) is 0 then Column 4 is a U (displacement) and vice versa for my Forces. I need this to help me set up my K Matrix in order for it to solve for either F or U.
Keep in mind that this is only sample data and the amount of nodes are variable which is why I am trying to keep it in vector format. The amount of columns are fixed
Thanks,
90% Newbie
Best Answer