function [k]=Frame2Noded_1Dk(X,b,h, E)
%clear all;                                   


syms x z real;
L=X(end)-X(1)
%syms L b h E real;


%uo =[1 x][a1 a2]'
%w = [1 x x^2 x^3][a3 a4 a5 a6];
%[u w dwdx]'= [1 x 0 0 0 0;0 0 1 x x^2 x^3;0 0 0 1 2x 3x^2][a1 a2 a3 a4
%a5a6]
%u = uo - z d2w/dx2

PIM=[1 0 0 0  0    0; ...
     0 0 1 0  0    0; ...
     0 0 0 1  0    0; ...
     1 L 0 0  0    0;
     0 0 1 L L^2  L^3; ...
     0 0 0 1 2*L 3*L^2];


Ni = [1 x 0 0 0 0;0 0 1 x x^2 x^3]*inv(PIM);  % 2x6  * 6x6

%ex = duo/dx -z  d2w / dx2

B= diff(Ni(1,:),x,1) -z*diff(Ni(2,:),x,2);

k= int( int(B'*E*B*b,x,0,L),z,-h/2,h/2);




   