function [G,E,constant_G,constant_E]=create_GE(modelnum)
global zeng2
G=zeros(zeng2.dummymodel{modelnum}.nodes_all_length,zeng2.dummymodel{modelnum}.Inumber);
E=G;
length_all=[0 0];
constant_G=1;
constant_E=1;

for i=1:length(zeng2.dummymodel{modelnum}.var)
    length_all=length_all(2)+[1 zeng2.dummyvar{zeng2.dummymodel{modelnum}.var(i)}.nseg];
    for j=1:zeng2.dummymodel{modelnum}.Inumber
        if isnumeric(zeng2.dummyvar{zeng2.dummymodel{modelnum}.var(i)}.model.I{j}.G)
            G(length_all(1):length_all(2),j)=zeng2.dummyvar{zeng2.dummymodel{modelnum}.var(i)}.model.I{j}.G;
        else
            constant_G=0;
        end
        if isnumeric(zeng2.dummyvar{zeng2.dummymodel{modelnum}.var(i)}.model.I{j}.E)
            E(length_all(1):length_all(2),j)=zeng2.dummyvar{zeng2.dummymodel{modelnum}.var(i)}.model.I{j}.E;
        else
            constant_E=0;
        end
    end
end
