MATLAB: How do i create Apply Boundary Conditions

apply boundary conditions

How do I create a Boundary Conditions with GSM.
And here is my previous setup for Element 1,2,and 3 and a GSM with those 3 element.

Best Answer

It seems that you know force boundary conditions for your nodes.
Following the equation:
[K] {u} = {F}
You do not know your displacements - the x vector, but you know the external forces at the nodes, the F vector.
What you are asked is to assign the external forces as
% Edit 4 nodes
Ext_F = [0; 0; 0 ;F] % Keep in mind, this is a row vector
The hint given to you about, that you don't need the complete global stiffness: you can check on the paper first, how can you obtain i.e. displacement u1.