##Naide4_5Gamma.m
#  vt lk 349
close all 
clear
## 
#dbwhere(530)
#
##=========================================================================
## This Program is written by Andres Lahe,   2015-03-30
##                    e-mail: andres.lahe@ttu.ee
## LAST MODIFIED: Andres Lahe,    2015-05-05
## Copyright (c)  2015  by Tallinn University of Technology 
##                Department of Mechanics
##                http://www.ttu.ee/%
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
## as published by the Free Software Foundation; either version 2
## of the License, or (at your option) any later version.

## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.

## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
## http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
##=========================================================================
#
## lk 383 vt  ml/2=ql/2   m=q
## lk 343 bimomendi epüüri peallekandmint
##lk392 deplanatsiooni märklk398
 eps1=1.0*10e-11;
 eps2=0.00001 # 4 nulli pärast koma, eristab sortimisel  299.99999
 global spA
 global X
 global AP 
## global Fvvs
NNK=32 %%34
#--------- Define a matrix spA to be sparse -----------
disp('-------- Sparse matrix instantiation --------  ')
disp('  spA=sparse(NNK,NNK)  ')
spA=sparse(NNK,NNK) # nullistan võrrandisüsteemi kordajate maatriksi
#--------- Define a vector B ------------
disp('-------- Right-hand side of the equations (RHS). --------  ')
disp('  Bvb=zeros(NNK,1);  ')
Bvb=zeros(NNK,1);   # nullistan võrrandisüsteemi vabaliikmed
disp('   ')
#######
#baasi0=1.0   # baasjäikus
baasi0=1.0e+8  # baasjäikus
l1=400  # cm   # varda 1 pikkus   
l2=500  # cm   # varda 2 pikkus 
#x=0.0 # cm   # koordinaat xs
#
qz=10.0
mx=10.0 # N    # lausmoment 
GIt= 1.5637e+09
EIw= 2.8348e+13 #Ncm4 # kooldumisjäikus
k=sqrt(GIt/EIw) ## k =  0.0074270
GAr=  2.8348e+13
EI = EIw/16.097
######################################
#qz=100.0
#mx=100.0 # N    # lausmoment 
#mx1=mx;EIX =  1.7611e+12
#mx=1000.0 
#mx=10000.0 # N    # lausmoment
#Mx2=3.20e+05 # Ncm    # koondmoment 320 000
#Mx2=3.20e+05 # Ncm  -147 m kgcm  lk 352
#Mx=3.20e+05 # Ncm    # koondmoment 
##By=-1.00e+07 # Ncm2    # koondbimoment 10 000 000
#By=-1.00e+07
##By=1.00e+11
#a2=300  # cm   # lausmomendi algus
# Iw=1349900
# It= 195.50
#GIt= 1.5837e+09  # Ncm2      # väändejäikus
#######
#G =  8000000                                                                                                                                                                                                            
#E =  21000000                                                                                                                                                                                                             
#It =  195.50                                                                                                 
#Iw =  1349900                                                                                                       
#GIt=G*It =  1.5640e+09 
#EIw=E*Iw =  2.8348e+13                                                                                                
#kt=sqrt(GIt/EIw)   =  0.0074270
#k=sqrt(GIt/EIw)
#######
#Iw=1349900  # cm6
#Ix=83860  # cm4
##EIw=2.8356e+13                                                                                                                                                                                                                                                                                                                  
#EIX=E*Ix
#EIX =  1.7611e+12
#EI =  1.7611e+12
#EJw=E*Iw
#EJw =  2.8348e+13
##########################################
#==========
#    Nodal coordinates
#==========
krdn=[#  x       y
        0.0     0.0;    # node 1
        l1      0.0;    # node 2
        l1      -l2];   # node 3 
#==========
#%%%%%%%%%%%%
SARV=size(krdn);
NSARV=SARV(1,1);
#%%%
for i=1:NSARV
sJrN(i)=i;
end
#
sJrNT=sJrN';
###%%
#==========
selemjl=[# n1 - beginning of the element,
#              n2 - end of the element
           1   2;    # element 1
           2   3];    # element 2  
#==========
#%%%%%%%%%%%%
selem=[selemjl(:,1) selemjl(:,2)];
EARV=size(selem);
NEARV=EARV(1,1);
#%%%%%%%%%%%%
selem=[selemjl(:,1) selemjl(:,2)];
##%%%
for i=1:NEARV
JrN(i)=i;
end
%
JrNT=JrN';
#%%%%
disp('===============================')
disp(' Nodal coordinates ')
disp('JrNr        X        Z  ')
disp('-----------------------------')
#disp([krdn])
for i=1:NSARV
disp(sprintf('  %2i    %7.4f  %7.4f',sJrNT(i),    krdn(i,1), krdn(i,2)))
endfor
disp('-----------------------------')
#%%%
##%%%
disp('=========================')
disp(' Topology of elements    ')
disp('     At the     At the   ')
disp(' Nr  beginning, end  ')
disp('-------------------------')
#disp([selem])
for i=1:NEARV
disp(sprintf('  %2i     %2i    %2i',JrNT(i),    selemjl(i,1), selemjl(i,2)))
endfor
disp('-------------------------')
#
###
for i=1:NEARV
LkoordN=selem(i,2);
AkoordN=selem(i,1);
DeltaX(i)=krdn(LkoordN,1)-krdn(AkoordN,1);
DeltaZ(i)=krdn(LkoordN,2)-krdn(AkoordN,2);
#VGRx(i,1)=krdn(AkoordN,1);
#VGRx(i,2)=krdn(LkoordN,1);
#VGRz(i,1)=krdn(AkoordN,2);
#VGRz(i,2)=krdn(LkoordN,2);
endfor
#
#Varda pikkus
#lvarras
for i=1:NEARV
lvarras(i,1)=sqrt(DeltaX(i)^2+DeltaZ(i)^2);
endfor
#
for i=1:NEARV
cosAlpha(i,1)=DeltaX(i)/lvarras(i,1);
cosBeta(i,1)=DeltaZ(i)/lvarras(i,1);
%
suunakosin= zeros(2,2);
        suunakosin(1,1)=cosAlpha(i,1);
        suunakosin(1,2)=-cosBeta(i,1);
                
        suunakosin(2,1)=cosBeta(i,1);  
        suunakosin(2,2)=cosAlpha(i,1);  
                    
%suunakosin
%TJ=suunakosin(NEARV,cosAlpha(i,1),cosBeta(i,2));
TM2x2(:,:,i)=suunakosin;
endfor
%
disp(' Varda 1 teisendus maatriks ')
TMI2x2=TM2x2(:,:,1)
disp(' Varda 2 teisendus maatriks ')
TMII2x2=TM2x2(:,:,2)
#
#disp('-----------------------------')
disp('===================================')
disp(' The direction cosines of elements ')
disp('Element  cosAlpha  cosBeta ')
disp('-----------------------------------')
#disp([cosAlpha cosBeta])
for i=1:NEARV
disp(sprintf('  %2i     %7.4f   %7.4f',JrNT(i),    cosAlpha(i,:), cosBeta(i,:)))
endfor
disp('-----------------------------------')
#
#
#############################################
spvF=yspTVmI(baasi0,l1,l1,GAr,EI,GIt,EIw);  # hõreda laiendatud ülekandemaatriksi arvutus
#AAAA=full(spvF)
#vB1a=yzTVqz(baasi0,x,a,qz,EI); # koormusvektori arvutus
#vB1b=yzTVmx(baasi0,l,x,a,mx,GIt,EIw);IIv=1;
#vB1=vB1a+vB1b
IIv=1;
IJv=1;
#vB1=vB1.*(-1);
spA=spInsertBtoA(spA,IIv,IJv,spvF);     # astab ülekandemaatriksi võrrandisüsteemi
#Bvb=InsertBtoA(Bvb,NNK,1,IIv,1,vB1,4,1); # astab koormusvektori vabaliikmesse
####### 
spvF=yspTVmI(baasi0,l2,l2,GAr,EI,GIt,EIw);  # hõreda laiendatud ülekandemaatriksi arvutus
#vB2a=yzTVqz(baasi0,l2,0.0,qz,EI) # koormusvektori arvutus
vB2b=yzTVmx(baasi0,l2,l2,0.0,mx,GIt,EIw)
#vB2=vB2a+vB2b
vB2=vB2b

krda=2;
IIv=krda*8-7;
IJv=krda*16-15;
vB2=vB2.*(-1);  #
spA=spInsertBtoA(spA,IIv,IJv,spvF);     # astab ülekandemaatriksi võrrandisüsteemi
Bvb=InsertBtoA(Bvb,NNK,1,IIv,1,vB2,8,1); # astab koormusvektori vabaliikmesse
####### 
#Bvb
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ')
vorrandeidB=size(spA);
#rows_of_basic_equations=vorrandeidB(1,1);
#cols_of_basic_equations=vorrandeidB(1,2);
#non_zero_elements_in_the_basic_equations=nnz(spA);

spRidu=vorrandeidB(1,1);
pohivorrandiXe=vorrandeidB(1,2);
#disp('  ')
disp('-------- Pärast põhivõrrandite sisestamist on võrrandisüsteemis  ----  ')
spA_rida=sprintf(' %d', spRidu)
spA_veergu=sprintf(' %d', pohivorrandiXe)
#disp('  ')
Nr1=spRidu+1;
#disp('  ')
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
########## Rajatingimused 
k2=GIt/EIw;
##vask tugi; sõlm 1
## toetingimused
#   1   siire w    
#   2   pööre fi   
#   3   Q          
#   4   M          
#   5  väändenurk  
#   6  T_t         
#   7  bimoment     
#   8  T_w         
spA=spSisestaArv(spA,17,1,1);  # siire w
spA=spSisestaArv(spA,18,2,1);  # pööre fi
#
spA=spSisestaArv(spA,19,5,1);  # $theta_A$ - väändenurk
spA=spSisestaArv(spA,20,6,1);  # $T_tA$  
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#
vorrandeid=size(spA);
spRidu=vorrandeid(1,1);   
#
#disp('----- ')
vorrandeidR=size(spA);
#
disp(' ')
disp('-------- Pärast toel 1 toetingimuste lisamist on võrrandisüsteemis  ----  ')
spA_rows=vorrandeidR(1,1);
spA_rida=spA_rows
spA_cols=vorrandeidR(1,2);
spA_veergu=spA_cols
spA_rows=vorrandeidR(1,1);
#
#disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ')
## sõlm 2
# Pidevustingimused
#   9   siire w    17
#  10   pööre fi   18
#  11   Q          19
#  12   M          20
#  13  väändenurk  21
#  14  T_t         22
#  15  bimoment    23 
#  16  T_w         24
spA=spSisestaArv(spA,21,9,1);       # siire w
spA=spSisestaArv(spA,21,17,-1);
spA=spSisestaArv(spA,22,10,1);      #pööre fi
spA=spSisestaArv(spA,22,21,1);
spA=spSisestaArv(spA,23,13,1);  #väändenurk
spA=spSisestaArv(spA,23,18,-1);
#
spA=spSisestaArv(spA,24,14,1);
spA=spSisestaArv(spA,24,22,1);
#
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#disp('----- ')
vorrandeidD=size(spA);
#
disp(' ')
disp('-------- Pärast pidevusvõrrandite lisamist on võrrandisüsteemis  ----  ')
spA_rida=vorrandeidD(1,1)
spA_rowsD=spA_rida;
spA_veergu=vorrandeidD(1,2)
#
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

# Tasakaalutingimused
spA=spSisestaArv(spA,25,11,1);  # Q
spA=spSisestaArv(spA,25,19,1);
spA=spSisestaArv(spA,26,12,-1);  # M
spA=spSisestaArv(spA,26,22,1);
spA=spSisestaArv(spA,26,24,1);

spA=spSisestaArv(spA,27,20,1);  # M
spA=spSisestaArv(spA,27,14,1);
spA=spSisestaArv(spA,27,16,1);

#Bmxist=mx*l2^2*gmxB(l2,GIt,EIw);
spA=spSisestaArv(spA,28,15,1);  # B
spA=spSisestaArv(spA,28,23,1);  #  muudan
#
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
vorrandeid=size(spA);
spRidu=vorrandeid(1,1);
#disp('----- ')
vorrandeidE=size(spA);
disp(' ')
disp('-------- Pärast tasakaaluvõrrandite lisamist on võrrandisüsteemis  ----  ')
spA_rows=vorrandeidE(1,1);
spA_rida=spA_rows
spA_rowsE=spA_rows;
spA_cols=vorrandeidE(1,2);
spA_veergu=spA_cols
#
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
## sõlm 3
## toetingimused
#   25   siire w    
#   26   pööre fi   
#   27   Q          
#   28   M          
#   29  väändenurk  
#   30  T_t         
#   31  bimoment     
#   32  T_w 
spA=spSisestaArv(spA,29,25,1); # w
spA=spSisestaArv(spA,30,26,-1); # fi
spA=spSisestaArv(spA,31,29,1); # väändenurk
#
spA=spSisestaArv(spA,32,30,1);  # $T_{tL}+ T_{\omega}
#
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#
vorrandeid=size(spA);
spRidu=vorrandeid(1,1);   
#
#disp('----- ')
vorrandeidR=size(spA);
#
disp(' ')
disp('-------- Pärast toel 3 toetingimuste lisamist on võrrandisüsteemis  ----  ')
spA_rows=vorrandeidR(1,1);
spA_rida=spA_rows
spA_cols=vorrandeidR(1,2);
spA_veergu=spA_cols
spA_rows=vorrandeidR(1,1);
#
#disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ')
#
disp(' ')
spA_rank = sprank(spA) # võrrandisüsteemi astak

disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ')

A=full(spA);

################################################                                                                                                                                                                                                       
spA # hõre laiendatud ¨ulekandemaatriks
Bvb
# Teine märgikokkulepe.Väändnurk skaleeritud
Z=spA\Bvb; # lahendab võrrandisõteemist spA*X=Bvb
Z
#B3wa =  2.2073e+06
#B3wc =  2.1587e+07
#theta'=0.255*10^-6m   
#thetaAC=0.246*10^-6m 
#thetaAD=-0.441*10^-6m 
#wA=-0.751*10^-4m 

#Mc=-49300q
#Md=63000q
#Mac=22q
#Mad=290q

#Mc=-134m
#Md=144m
#Mac=228m
#Mad=-29.2

#Bc=-3790q
#Bd=4470q
#Bac=-4140q
#Bad=4140q

#Bc=3210m
#Bd=19700m
#Bac=9180m
#Bad=-9130m
#

#X4=9200m  lk350
#X4=-4140q

## OK lk 52 kõik klapib
  
NEARV=1;
#baasi0=1.0
#for i=1:NEARV
#%siireVardaA(i,1:2)
AlgPar1(1:8,1)=[Z(1,1)/baasi0; Z(2,1)/baasi0;  Z(3,1);  Z(4,1); 
Z(5,1)/baasi0;  Z(6,1);   Z(7,1);   Z(8,1)]
#
AlgPar2(1:8,1)=[Z(17,1)/baasi0;   Z(18,1)/baasi0;    Z(19,1);    Z(20,1);   
Z(21,1)/baasi0;   Z(22,1);    Z(23,1);    Z(24,1)]

#endfor
#      
#AlgParm=AlgPar;  
#disp('skaleerimata väändenurk skaleerimata väändenurk varda lõpus ')
#theta=Z(5,1)/baasi0; # skaleerimata väändenurk varda lõpus
#baasi0=baasi0
disp('   ')
#
  suurused=['     w -';
            '    fi -'; 
            '     Q -';  
            '     M -';              
            ' theta -'; 
            '    Tt -'; 
            '     B -'; 
            '    Tw -'; 
            '  Tsum -']; 
#
#  size(suurused)
#spA ; # hõre laiendatud ¨ulekandemaatriks
#disp(' Algparameetrid - AP ') 
   AP1=AlgPar1(:,1);
   AP2=AlgPar2(:,1);
   
 %size(AP1)
 %size(AP2)
disp(' Algparameetrid - AP1    ja    AP2 ')  
for i=1:8 
disp(sprintf('%8s %14.4e %14.4e',suurused(i,:), AP1(i,1), AP2(i,1) ))
endfor 
disp('   ')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  

 AP=AP1;
baasi0=1.0
Nmitmeks=4
xx=0.0;
xsamm=0.0;
xsamm=l1/Nmitmeks;
for ij=1:Nmitmeks+1  # 5 - displacements and forces at x=0.0   
Xloikes(ij,1)=xx;
#   vvF=ylWGfhlin(baasi0,l1,xx,GIt,EIw);
   vvF=ylTVlin(baasi0,l1,xx,GAr,EI,GIt,EIw);
# vvF=ylTfhlin(1.0,xx,GAr,EI);               # ylfhlin(1.0,xx,EA,GAr,EI);  
%%%  vvB1=yzWGmx(baasi0,l1,xx,a1,mx1,GIt,EIw); 
#vB1a=yzTVqz(baasi0,x,a,qz,EI); # koormusvektori arvutus
#vB1b=yzTVmx(baasi0,l,x,a,mx,GIt,EIw);IIv=1;
#vB1=vB1a+vB1b  
  
#  vvB=ESTtalaKrmus(1.0,xx,Li,Fjoud,qkoormus,EI);
  
 Fvv(1:8,ij)=vvF*AP;   %%+vvB1;
 Fvv(9,ij)=Fvv(6,ij)+Fvv(8,ij);
xx=xx+xsamm;
endfor 
#Fvv(1,:)
Fvv;
kt=sqrt(GIt/EIw);
k=kt
  nu=l1*sqrt(GIt/EIw);
 nul=nu/l1;
 lnu=l1/nu;
%%# nux=nul*x;
  nux=nul*l1;
 ch=cosh(nux);
 sh=sinh(nux);
#
  suurused=['     w -';
            '    fi -'; 
            '     Q -';  
            '     M -';              
            ' theta -'; 
            '    Tt -'; 
            '     B -'; 
            '    Tw -'; 
            '  Tsum -']; 
#disp(' size(suurused) ')            
  size(suurused);  
 

#for i=1:5
disp(sprintf('%9s %9.2f    %9.2f     %9.2f    %9.2f    %9.2f', ' x= ',  Xloikes(1,1), Xloikes(2,1), Xloikes(3,1), Xloikes(4,1),Xloikes(5,1)))
#endfor
 #  
#
for i=1:9 
disp(sprintf('%8s %12.3e %12.3e %12.3e %12.3e %12.3e',suurused(i,:), Fvv(i,1), Fvv(i,2), Fvv(i,3), Fvv(i,4), Fvv(i,5)))
endfor
 # 
disp('  ') 
#%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 AP=AP2;
baasi0=1.0
Nmitmeks=4
xx=0.0;
xsamm=0.0;
xsamm=l2/Nmitmeks;
for ij=1:Nmitmeks+1  # 5 - displacements and forces at x=0.0   
Xloikes(ij,1)=xx;
   vvF=ylTVlin(baasi0,l2,xx,GAr,EI,GIt,EIw); 
%%%%  vvB2=yzWGMx(baasi0,l2,xx,a2,Mx2,GIt,EIw); 
#  vvB=ESTtalaKrmus(1.0,xx,Li,Fjoud,qkoormus,EI);
#vB2a=yzTVqz(baasi0,xx,0.0,qz,EI) # koormusvektori arvutus
vB2b=yzTVmx(baasi0,l2,xx,0.0,mx,GIt,EIw);
#vB2=vB2a+vB2b
vB2=vB2b; 
 
 Fvv(1:8,ij)=vvF*AP+vB2;
 Fvv(9,ij)=Fvv(6,ij)+Fvv(8,ij);
xx=xx+xsamm;
endfor 
#Fvv(1,:)
Fvv;
kt=sqrt(GIt/EIw);
k=kt
  nu=l2*sqrt(GIt/EIw);
 nul=nu/l2;
 lnu=l2/nu;
# nux=nul*x;
  nux=nul*l2;
 ch=cosh(nux);
 sh=sinh(nux);
#
  
  suurused=['     w -';
            '    fi -'; 
            '     Q -';  
            '     M -';              
            ' theta -'; 
            '    Tt -'; 
            '     B -'; 
            '    Tw -'; 
            '  Tsum -']; 
#disp(' size(suurused) ');            
  size(suurused);          

#for i=1:5
disp(sprintf('%9s %9.2f    %9.2f     %9.2f    %9.2f    %9.2f', ' x= ',  Xloikes(1,1), Xloikes(2,1), Xloikes(3,1), Xloikes(4,1),Xloikes(5,1)))
#endfor
 # 
#
for i=1:9 
disp(sprintf('%8s %12.3e %12.3e %12.3e %12.3e %12.3e',suurused(i,:), Fvv(i,1), Fvv(i,2), Fvv(i,3), Fvv(i,4), Fvv(i,5)))
endfor
 # 
disp('  ')  
#X= l2/2-eps1;
#X=l2
#SFv=SisejoudWGMxpunktis(l2,X,a2,AP,Mx2,GIt,EIw,suurused); 
 # 
disp('  ') 
#
#%%%%%%%%%%%%%%%%%%%%%%%%%%%
figure(1)
#
#spy(spA,'*')
#spy(spA,'o')
spy(spA,'+','b')
#spy(spA,'x')
#spy(spA)
title('spy(spA) - hõreda maatriksi  spA(32,32)  nullist erinevad elemendid [8.2%] ')
grid("on")
refresh  
print('-dfig','-landscape','spESTNaide4_5Gamma_sparse_matrix.fig');  
refresh
disp('-----------------------------------')
disp('  ')
disp(' The END ')
#%%%%%%%%%%%%%%%    
 disp('  ') 
disp('  ') 
#%%%%%%%%%%%%%%%%
  #
disp('  ') 
Nmitmeks=80
AP=AP1;

baasi0=1.0;
xx=0;
xsamm=l1/Nmitmeks;
for ij=1:Nmitmeks+1  # 5 - displacements and forces at x=0.0   
Xloikes(ij,1)=xx;
   vvF=ylTVlin(baasi0,l1,xx,GAr,EI,GIt,EIw);
# vvF=ylTfhlin(1.0,xx,GAr,EI);               # ylfhlin(1.0,xx,EA,GAr,EI);  
%%%  vvB1=yzWGmx(baasi0,l1,xx,a1,mx1,GIt,EIw); 
#vB1a=yzTVqz(baasi0,x,a,qz,EI); # koormusvektori arvutus
#vB1b=yzTVmx(baasi0,l,x,a,mx,GIt,EIw);IIv=1;
#vB1=vB1a+vB1b

  Fvv1(1:8,ij)=vvF*AP;   %%+vvB1;
 Fvv1(9,ij)=Fvv1(6,ij)+Fvv1(8,ij);
  Fvv1(10,ij)=xx;
xx=xx+xsamm;
ViimaneX1=ij;
endfor 
Fvv1(10,ViimaneX1)=Fvv1(10,ViimaneX1)-eps2;

size(Fvv1(10,1:ViimaneX1));

######
#plot3(ty1, tx1, tz1) ## OK
#view(26, 42);
#%%%%
AP=AP2;

baasi0=1.0;
disp('  ') 
Nmitmeks=100
xx=0;
xsamm=l2/Nmitmeks;
for ij=1:Nmitmeks+1  # 5 - displacements and forces at x=0.0   
Xloikes(ij,1)=xx;
    vvF=ylTVlin(baasi0,l2,xx,GAr,EI,GIt,EIw);
# vvF=ylTfhlin(1.0,xx,GAr,EI);               # ylfhlin(1.0,xx,EA,GAr,EI);  
 # vvB=yzWGMx(baasi0,l2,xx,a2,Mx2,GIt,EIw);
  %%%%  vvB2=yzWGMx(baasi0,l2,xx,a2,Mx2,GIt,EIw); 
#  vvB=ESTtalaKrmus(1.0,xx,Li,Fjoud,qkoormus,EI);
#vB2a=yzTVqz(baasi0,xx,0.0,qz,EI) # koormusvektori arvutus
vB2b=yzTVmx(baasi0,l2,xx,0.0,mx,GIt,EIw);
#vB2=vB2a+vB2b
vB2=vB2b;

  Fvv2(1:8,ij)=vvF*AP+vB2;
 Fvv2(9,ij)=Fvv2(6,ij)+Fvv2(8,ij);
 Fvv2(10,ij)=xx+l1;
xx=xx+xsamm;
ViimaneX2=ij;
endfor 
# 
##Fvv1(10,ViimaneX2)=Fvv1(10,ViimaneX2);  %% -eps2;
######
#
#plot3(ty1, tx1, tz1)
#
#ViimaneX=ViimaneX1+ViimaneX2  %%+ViimaneX3
#%%%%%%%%%%%%%%%%%
#Fvv(1:4,:)=[Fvv1(1:4,:) Fvv2(1:4,:) Fvv3(1:4,:)];
#Fvv(5,:)=[Fvv1(5,:) Fvv2(5,:) Fvv3(5,:)];
Fvv11=Fvv1(1,:);
Fvv12=Fvv2(1,:);
#Fvv13=Fvv3(1,:);
Fvv1s=[Fvv11 Fvv12]; #Fvv13];

Fvv21=Fvv1(2,:);
Fvv22=Fvv2(2,:);
#Fvv23=Fvv3(2,:);
Fvv2s=[Fvv21 Fvv22]; #Fvv23];

Fvv31=Fvv1(3,:);
Fvv32=Fvv2(3,:);
#Fvv33=Fvv3(3,:);
Fvv3s=[Fvv31 Fvv32]; #Fvv33];

Fvv41=Fvv1(4,:);
Fvv42=Fvv2(4,:);
#Fvv43=Fvv3(4,:);
Fvv4s=[Fvv41 Fvv42]; #Fvv43];

Fvv51=Fvv1(5,:);
Fvv52=Fvv2(5,:);
#Fvv53=Fvv3(5,:);
Fvv5s=[Fvv51 Fvv52]; #Fvv53];

Fvv61=Fvv1(6,:);
Fvv62=Fvv2(6,:);
#Fvv63=Fvv3(6,:);
Fvv6s=[Fvv61 Fvv62]; #Fvv63];
%%%%%%%%%%%%%%%
Fvv71=Fvv1(7,:);
Fvv72=Fvv2(7,:);
#Fvv73=Fvv7(7,:);
Fvv7s=[Fvv71 Fvv72]; #Fvv73];

Fvv81=Fvv1(8,:);
Fvv82=Fvv2(8,:);
#Fvv83=Fvv3(8,:);
Fvv8s=[Fvv81 Fvv82]; #Fvv83];

Fvv91=Fvv1(9,:);
Fvv92=Fvv2(9,:);
#Fvv93=Fvv3(9,:);
Fvv9s=[Fvv91 Fvv92]; #Fvv93];

Fvv101=Fvv1(10,:);
Fvv102=Fvv2(10,:);
#Fvv103=Fvv3(10,:);
Fvv10s=[Fvv101 Fvv102]; #Fvv103];

Fvvs=[Fvv1s; 
Fvv2s; 
Fvv3s; 
Fvv4s; 
Fvv5s; 
Fvv6s; 
Fvv7s; 
Fvv8s; 
Fvv9s; 
Fvv10s];
#FvvsSize=size(Fvvs);
#%%%%%%%%%%%%%%%%%
#%ViimaneX=ij
disp('  ')
#
##SFv(6,1)=SFv(6,1)+l1;
#ViimaneX=FvvsSize(1,2)
#ViimaneX=ViimaneX1+ViimaneX2  #+ViimaneX3
#ViimaneX=ViimaneX+1;
#Fvvs(1:10,ViimaneX)=SFv(1:10,1);
#%FvvsSize=size(Fvvs)
FvvsTus=Fvvs';
FvvsT=sortrows(FvvsTus,10);
#FvvsT(:,10);
#Kontrolliks=[FvvsT(:,10) FvvsT(:,5).*10000]
#%FvvsTSize=size(FvvsT)
Fvvs=FvvsT'; 
FvvsSize=size(Fvvs);
#%%%%%%%%%%%%%%%%%%%%%%%%%%% 
#Fvvs(10,:)
#%%%%%%%%%%%%%%%%%   
LisaGr=0.2;
 #%%%%%%%%%%%%%%%%%%%%%%%%%%% 
  MiMaTa=minMaxGrfTVnurk(LisaGr,Fvvs);
  	maxwgr=MiMaTa(1,1);
	minwgr=MiMaTa(1,2);
	maxfigr=MiMaTa(2,1);
	minfigr=MiMaTa(2,2);
	maxQgr=MiMaTa(3,1);
	minQgr=MiMaTa(3,2);
	maxMgr=MiMaTa(4,1);
	minMgr=MiMaTa(4,2);  
  
  	maxthetagr=MiMaTa(5,1);
	minthetagr=MiMaTa(5,2);
	maxTtgr=MiMaTa(6,1);
	minTtgr=MiMaTa(6,2);
	maxBwgr=MiMaTa(7,1);
	minBwgr=MiMaTa(7,2);
	maxTwgr=MiMaTa(8,1);
	minTwgr=MiMaTa(8,2);        
	maxTsumgr=MiMaTa(9,1);
	minTsumgr=MiMaTa(9,2); 
%%%%%%%%%
L=l1+l2  
%%%%%%%%%
L=l1+l2; %+l3;
JA=-0.075*L;
JL=L+0.075*L;
%jaotT=L/8;
jaotT=100;
XL1=L;
Xg=[0.0; XL1];
Yg=[0.0; 0.0];
%%%%%%%%%
Xloikes=Fvvs(10,:);
XloikesT= Xloikes';
 FvvsT=Fvvs; 
%%
 XA0=XloikesT(1,1);
 YA0=0.0;
%% Xloikes(ij,1)%
 ViimaneXm=size(Xloikes);
 ViimaneX=ViimaneXm(1,2);
%%%%%%%%% 
 YAY=FvvsT(1,1);
 YLY=FvvsT(1,ViimaneX);
 X0=[0.0; 0.0];
 Y0=[0.0;  YAY];
 YAY=FvvsT(1,1);
 XL=[L; L];
 YL=[0.0; YLY];
% maxwgr=max(FvvsT(1,:));
 Xsuurus=size(Xloikes);
% thetasuurus=size(FvvsT(1,:);)
% FvvsT(1,:);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
x100 = 1.0;
i100=1;
while x100 < 100-eps2;
%   disp(x100);
   i100=i100+1;
   x100 = Xloikes(1,i100);
endwhile;

x200 = 1.0;
i200=1;
while x200 < 200-eps2;
%   disp(x200);
   i200=i200+1;
   x200 = Xloikes(1,i200);
endwhile;

x300 = 1.0;
i300=1;
while x300 < 300-eps2;
%   disp(x300);
   i300=i300+1;
   x300 = Xloikes(1,i300);
endwhile;

x400 = 1.0;
i400=1;
while x400 < 400-eps2;
%   disp(x400);
   i400=i400+1;
   x400 = Xloikes(1,i400);
endwhile;

x525 = 10.0;
i525=1;
while x525 < 525-eps2;
%   disp(x525);
   i525=i525+1;
   x525 = Xloikes(1,i525);
endwhile;

x650 = 10.0;
i650=1;
while x650 < 650-eps2;
%   disp(x650);
   i650=i650+1;
   x650 = Xloikes(1,i650);
endwhile;

x775 = 10.0;
i775=1;
while x775 < 775-eps2;
%   disp(x775);
   i775=i775+1;
   x775 = Xloikes(1,i775);
endwhile;

x900 = 10.0;
i900=1;
while x900 < 900-eps2;
%   disp(x900);
   i900=i900+1;
   x900 = Xloikes(1,i900);
endwhile;
  
x1500 = 10.0;
i1500=1;
#while x1500 < 1500-eps2;
%   disp(x1500);
#   i1500=i1500+1;
#   x1500 = Xloikes(1,i1500);
#endwhile;  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 i100;
 x100;
  i200;
  x200;
   i300;
   x300;
     i400;
     x400;
 i525;
 x525; 
   i650;
   x650;  
     i775;
     x775;  
       i900
       x900 
#   i1500;
#   x1500;    
%%%%%%%%%%%%%%%% 
Y10Y=FvvsT(1,i100);
Y20Y=FvvsT(1,i200);
Y30Y=FvvsT(1,i300);
Y40Y=FvvsT(1,i400);
Y525Y=FvvsT(1,i525);
Y65Y=FvvsT(1,i650);
Y775Y=FvvsT(1,i775);
Y90Y=FvvsT(1,i900);
#Y150Y=FvvsT(1,i1500);
%%%%%
X10X=x100;
X20X=x200;
X30X=x300;
X40X=x400;
X525X=x525;
X65X=x650;
X775X=x775;
X90X=x900;
#X150X=x1500;
%%%%%
X100=[X10X;X10X];
Y100=[0.0;Y10Y];
   X200=[X20X;X20X];
   Y200=[0.0;Y20Y];
 X300=[X30X;X30X];
 Y300=[0.0;Y30Y];
   X400=[X40X;X40X];
   Y400=[0.0;Y40Y];
 X525=[X525X;X525X];
 Y525=[0.0;Y525Y];
   X650=[X65X;X65X];
   Y650=[0.0;Y65Y];
 X775=[X775X;X775X];
 Y775=[0.0;Y775Y];
   X900=[X90X;X90X];
   Y900=[0.0;Y90Y];
# X1500=[X150X;X150X];
# Y1500=[0.0;Y150Y];  
 
 %%%%%%%%% 
 Xsuurus=size(Xloikes);
 Xloikes=Fvvs(10,:);
 XloikesT= Xloikes';
 YAY=FvvsT(1,1);
 YLY=FvvsT(1,ViimaneX);
 X0=[0.0; 0.0];
 Y0=[0.0;  YAY];
 YAY=FvvsT(1,1);
 XL=[L; L];
 YL=[0.0; YLY];
% mxtheta=max(FvvsT(1,:));
 Xsuurus=size(Xloikes);

% FvvsT(1,:);
%%%%%
## #,X100,Y100,"3",X200,Y200,"3",X300,Y300,"3",X400,Y400,"3",X525,Y525,"3",X650,Y650,"3",X775,Y775,"3",X900,Y900,"3"         #  ,X1500,Y1500,"3"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
JA=-0.075*L;
JL=L+0.075*L;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ,Xloikes(1,:),FvvsT(1,:),"3" 
figure(2)
%
  plot( X0,Y0,"3",Xloikes(1,:),FvvsT(1,:),"3",Xg,Yg,"3",XL,YL,"3",X100,Y100,"3",X200,Y200,"3",X300,Y300,"3",X400,Y400,"3",X525,Y525,"3",X650,Y650,"3",X775,Y775,"3",X900,Y900,"3")
grid("on")
% http://www.network-theory.co.uk/docs/octave3/octave_160.html
%grid("off")
%
ax = gca ();
set (ax, "outerposition", [ 0  0  1 0.55])
% minwgr maxwgr
 axis([JA JL  minwgr maxwgr], "ij")  % telgede piirid [Xalg Xlõpp Zalg Zlõpp]
 ax=gca();
   xticks(1,:)=0.0:jaotT:L;
 set (ax, "xtick", xticks)
title('Siire w ',"fontsize",10)
        xlabel('x [m]',"fontsize",10)
	ylabel('w [cm]',"fontsize",10)
%
%%print('-deps','Siire_w.eps');
%%print('-dpng','Siire_w.png');
%print('-dfig','-landscape','-mono','-solid','Siire_w.fig');
%%print('-dfig','-solid','-landscape','-color','Siire_w.fig');
%%http://www.gnu.org/software/octave/doc/interpreter/Printing-Plots.html
refresh
%
%%%%%%%%%%%%%%%% 
Y10Y=FvvsT(2,i100);
Y20Y=FvvsT(2,i200);
Y30Y=FvvsT(2,i300);
Y40Y=FvvsT(2,i400);
Y525Y=FvvsT(2,i525);
Y65Y=FvvsT(2,i650);
Y775Y=FvvsT(2,i775);
Y90Y=FvvsT(2,i900);
%%%%%%%%%%%%%%%% 
X100=[X10X;X10X];
Y100=[0.0;Y10Y];
   X200=[X20X;X20X];
   Y200=[0.0;Y20Y];
 X300=[X30X;X30X];
 Y300=[0.0;Y30Y];
   X400=[X40X;X40X];
   Y400=[0.0;Y40Y];
 X525=[X525X;X525X];
 Y525=[0.0;Y525Y];
   X650=[X65X;X65X];
   Y650=[0.0;Y65Y];
 X775=[X775X;X775X];
 Y775=[0.0;Y775Y];
   X900=[X90X;X90X];
   Y900=[0.0;Y90Y];
%%%%%%%%%  
JA=-0.075*L;
JL=L+0.075*L;
 YAY=FvvsT(2,1);
 YLY=FvvsT(2,ViimaneX);
 X0=[0.0; 0.0];
 Y0=[0.0;  YAY];
 YAY=FvvsT(2,1);
 XL=[L; L];
 YL=[0.0; YLY];
% maxfig=max(FvvsT(2,:));
 Xsuurus=size(Xloikes);
% FvvsT(2,:);
%%%%%%%%%   
figure(3)
%
  plot( X0,Y0,"3",Xloikes(1,:),FvvsT(2,:),"3",Xg,Yg,"3",XL,YL,"3",X100,Y100,"3",X200,Y200,"3",X300,Y300,"3",X400,Y400,"3",X525,Y525,"3",X650,Y650,"3",X775,Y775,"3",X900,Y900,"3")
grid("on")
% http://www.network-theory.co.uk/docs/octave3/octave_160.html
%grid("off")
%
ax = gca ();
set (ax, "outerposition", [ 0  0  1 0.55])
%
 axis([JA JL minfigr maxfigr+0.0000001], "ij")  % telgede piirid [Xalg Xlõpp Zalg Zlõpp]
 ax=gca();
   xticks(1,:)=0.0:jaotT:L;
 set (ax, "xtick", xticks)
title('Paindenurk fi ',"fontsize",10)
        xlabel('x [m]',"fontsize",10)
	ylabel('fi [rad]',"fontsize",10)
%
%%print('-deps','Paindenurk_fi.eps');
%%print('-dpng','Paindenurk_fi.png');
%print('-dfig','-landscape','-mono','-solid','Paindenurk_fi.fig');
%%print('-dfig','-solid','-landscape','-color','Paindenurk_fi.fig');
%%http://www.gnu.org/software/octave/doc/interpreter/Printing-Plots.html
refresh
%
%%%%%%%%%%%%%%%% 
Y10Y=FvvsT(5,i100);
Y20Y=FvvsT(5,i200);
Y30Y=FvvsT(5,i300);
Y40Y=FvvsT(5,i400);
Y525Y=FvvsT(5,i525);
Y65Y=FvvsT(5,i650);
Y775Y=FvvsT(5,i775);
Y90Y=FvvsT(5,i900);
%%%%%%%%%%%%%%%% 
X100=[X10X;X10X];
Y100=[0.0;Y10Y];
   X200=[X20X;X20X];
   Y200=[0.0;Y20Y];
 X300=[X30X;X30X];
 Y300=[0.0;Y30Y];
   X400=[X40X;X40X];
   Y400=[0.0;Y40Y];
 X525=[X525X;X525X];
 Y525=[0.0;Y525Y];
   X650=[X65X;X65X];
   Y650=[0.0;Y65Y];
 X775=[X775X;X775X];
 Y775=[0.0;Y775Y];
   X900=[X90X;X90X];
   Y900=[0.0;Y90Y];
%%%%%%%%%  
JA=-0.075*L;
JL=L+0.075*L;
 YAY=FvvsT(5,1);
 YLY=FvvsT(5,ViimaneX);
 X0=[0.0; 0.0];
 Y0=[0.0;  YAY];
 YAY=FvvsT(5,1);
 XL=[L; L];
 YL=[0.0; YLY];
% maxfig=max(FvvsT(5,:));
 Xsuurus=size(Xloikes);
% FvvsT(5,:);
%%%%%%%%%   
figure(4)
%
  plot( X0,Y0,"3",Xloikes(1,:),FvvsT(5,:),"3",Xg,Yg,"3",XL,YL,"3",X100,Y100,"3",X200,Y200,"3",X300,Y300,"3",X400,Y400,"3",X525,Y525,"3",X650,Y650,"3",X775,Y775,"3",X900,Y900,"3")
grid("on")
% http://www.network-theory.co.uk/docs/octave3/octave_160.html
%grid("off")
%
ax = gca ();
set (ax, "outerposition", [ 0  0  1 0.55])
%
 axis([JA JL minthetagr maxthetagr], "ij")  % telgede piirid [Xalg Xlõpp Zalg Zlõpp]
 ax=gca();
   xticks(1,:)=0.0:jaotT:L;
 set (ax, "xtick", xticks)
title('Vaandenurk theta ',"fontsize",10)
        xlabel('x [m]',"fontsize",10)
	ylabel('fi [rad]',"fontsize",10)
%
%%print('-deps','Vaandenurk_theta.eps');
%%print('-dpng','Vaandenurk_theta.png');
%print('-dfig','-landscape','-mono','-solid','Vaandenurk_theta.fig');
%%print('-dfig','-solid','-landscape','-color','Vaandenurk_theta.fig');
%%http://www.gnu.org/software/octave/doc/interpreter/Printing-Plots.html
refresh
%
%%%%%%%%%%%%%%%% 
Y10Y=FvvsT(3,i100);
Y20Y=FvvsT(3,i200);
Y30Y=FvvsT(3,i300);
Y40Y=FvvsT(3,i400);
Y525Y=FvvsT(3,i525);
Y65Y=FvvsT(3,i650);
Y775Y=FvvsT(3,i775);
Y90Y=FvvsT(3,i900);
%%%%%%%%%%%%%%%% 
X100=[X10X;X10X];
Y100=[0.0;Y10Y];
   X200=[X20X;X20X];
   Y200=[0.0;Y20Y];
 X300=[X30X;X30X];
 Y300=[0.0;Y30Y];
   X400=[X40X;X40X];
   Y400=[0.0;Y40Y];
 X525=[X525X;X525X];
 Y525=[0.0;Y525Y];
   X650=[X65X;X65X];
   Y650=[0.0;Y65Y];
 X775=[X775X;X775X];
 Y775=[0.0;Y775Y];
   X900=[X90X;X90X];
   Y900=[0.0;Y90Y];
%%%%%%%%%   
JA=-0.075*L;
JL=L+0.075*L;
YAY=FvvsT(3,1);
 YLY=FvvsT(3,ViimaneX);
 X0=[0.0; 0.0];
 Y0=[0.0;  YAY];
 YAY=FvvsT(3,1);
 XL=[L; L];
 YL=[0.0; YLY];
% maxQgr=max(FvvsT(3,:));
 Xsuurus=size(Xloikes);
% FvvsT(3,:);
%%%%%%%%%   
figure(5)
%
  plot( X0,Y0,"3",Xloikes(1,:),FvvsT(3,:),"3",Xg,Yg,"3",XL,YL,"3",X100,Y100,"3",X200,Y200,"3",X300,Y300,"3",X400,Y400,"3",X525,Y525,"3",X650,Y650,"3",X775,Y775,"3",X900,Y900,"3")
grid("on")
% http://www.network-theory.co.uk/docs/octave3/octave_160.html
%grid("off")
%
ax = gca ();
set (ax, "outerposition", [ 0  0  1 0.55])
%
 axis([JA JL -3.5 1.5], "ij")  % telgede piirid [Xalg Xlõpp Zalg Zlõpp]
 ax=gca();
   xticks(1,:)=0.0:jaotT:L;
 set (ax, "xtick", xticks)
title('P6ikj6ud Qz ',"fontsize",10)
        xlabel('x [m]',"fontsize",10)
	ylabel('Qz [N]',"fontsize",10)
%
%%print('-deps','P6ikj6ud_Qz.eps');
%%print('-dpng','P6ikj6ud_Qz.png');
%print('-dfig','-landscape','-mono','-solid','P6ikj6ud_Qz.fig');
%%print('-dfig','-solid','-landscape','-color','P6ikj6ud_Qz.fig');
%%http://www.gnu.org/software/octave/doc/interpreter/Printing-Plots.html
refresh
%
%%%%%%%%%%%%%%%% 
Y10Y=FvvsT(4,i100);
Y20Y=FvvsT(4,i200);
Y30Y=FvvsT(4,i300);
Y40Y=FvvsT(4,i400);
Y525Y=FvvsT(4,i525);
Y65Y=FvvsT(4,i650);
Y775Y=FvvsT(4,i775);
Y90Y=FvvsT(4,i900);
%%%%%%%%%%%%%%%% 
X100=[X10X;X10X];
Y100=[0.0;Y10Y];
   X200=[X20X;X20X];
   Y200=[0.0;Y20Y];
 X300=[X30X;X30X];
 Y300=[0.0;Y30Y];
   X400=[X40X;X40X];
   Y400=[0.0;Y40Y];
 X525=[X525X;X525X];
 Y525=[0.0;Y525Y];
   X650=[X65X;X65X];
   Y650=[0.0;Y65Y];
 X775=[X775X;X775X];
 Y775=[0.0;Y775Y];
   X900=[X90X;X90X];
   Y900=[0.0;Y90Y];
%%%%%%%%%       
 YAY=FvvsT(4,1);
 YLY=FvvsT(4,ViimaneX);
 X0=[0.0; 0.0];
 Y0=[0.0;  YAY];
 YAY=FvvsT(4,1);
 XL=[L; L];
 YL=[0.0; YLY];
% mxtheta=max(FvvsT(4,:));
 Xsuurus=size(Xloikes);
% thetasuurus=size(FvvsT(4,:);)
% FvvsT(4,:);
%%%%%%%%%   
figure(6)
%
  plot( X0,Y0,"3",Xloikes(1,:),FvvsT(4,:),"3",Xg,Yg,"3",XL,YL,"3",X100,Y100,"3",X200,Y200,"3",X300,Y300,"3",X400,Y400,"3",X525,Y525,"3",X650,Y650,"3",X775,Y775,"3",X900,Y900,"3")
grid("on")
% http://www.network-theory.co.uk/docs/octave3/octave_160.html
%grid("off")
%
ax = gca ();
set (ax, "outerposition", [ 0  0  1 0.55])
%minMgr maxMgr
 axis([JA JL -3100 950], "ij")  % telgede piirid [Xalg Xlõpp Zalg Zlõpp]
 ax=gca();
   xticks(1,:)=0.0:jaotT:L;
 set (ax, "xtick", xticks)
title('Paindemoment My ',"fontsize",10)
        xlabel('x [m]',"fontsize",10)
	ylabel('My [Ncm]',"fontsize",10)
%
%%print('-deps','Paindemoment_My.eps');
%%print('-dpng','Paindemoment_My.png');
%print('-dfig','-landscape','-mono','-solid','Paindemoment_My.fig');
%%print('-dfig','-solid','-landscape','-color','Paindemoment_My.fig');
%%http://www.gnu.org/software/octave/doc/interpreter/Printing-Plots.html
refresh
%
%%%%%%%%%%%%%%%% 
Y10Y=FvvsT(9,i100);
Y20Y=FvvsT(9,i200);
Y30Y=FvvsT(9,i300);
Y40Y=FvvsT(9,i400);
Y525Y=FvvsT(9,i525);
Y65Y=FvvsT(9,i650);
Y775Y=FvvsT(9,i775);
Y90Y=FvvsT(9,i900);
%%%%%%%%%%%%%%%% 
X100=[X10X;X10X];
Y100=[0.0;Y10Y];
   X200=[X20X;X20X];
   Y200=[0.0;Y20Y];
 X300=[X30X;X30X];
 Y300=[0.0;Y30Y];
   X400=[X40X;X40X];
   Y400=[0.0;Y40Y];
 X525=[X525X;X525X];
 Y525=[0.0;Y525Y];
   X650=[X65X;X65X];
   Y650=[0.0;Y65Y];
 X775=[X775X;X775X];
 Y775=[0.0;Y775Y];
   X900=[X90X;X90X];
   Y900=[0.0;Y90Y];
%%%%%%%%%%%%%%%%%   
JA=-0.075*L;
JL=L+0.075*L;
YAY=FvvsT(9,1);
 YLY=FvvsT(9,ViimaneX);
 X0=[0.0; 0.0];
 Y0=[0.0;  YAY];
 YAY=FvvsT(9,1);
 XL=[L; L];
 YL=[0.0; YLY];
% maxQgr=max(FvvsT(9,:));
 Xsuurus=size(Xloikes);
% FvvsT(9,:);
%%%%%%%%%   
figure(7)
%
  plot( X0,Y0,"3",Xloikes(1,:),FvvsT(9,:),"3",Xg,Yg,"3",XL,YL,"3",X100,Y100,"3",X200,Y200,"3",X300,Y300,"3",X400,Y400,"3",X525,Y525,"3",X650,Y650,"3",X775,Y775,"3",X900,Y900,"3")
grid("on")
% http://www.network-theory.co.uk/docs/octave3/octave_160.html
%grid("off")
%
ax = gca ();
set (ax, "outerposition", [ 0  0  1 0.55])
%
 axis([JA JL minTsumgr-500 maxTsumgr+1000], "ij")  % telgede piirid [Xalg Xlõpp Zalg Zlõpp]
 ax=gca();
   xticks(1,:)=0.0:jaotT:L;
 set (ax, "xtick", xticks)
title('Koguv66ndemoment Tsum ',"fontsize",10)
        xlabel('x [m]',"fontsize",10)
	ylabel('Tsum [kNcm]',"fontsize",10)
%
%%print('-deps','Koguv66ndemoment_Tsum.eps');
%%print('-dpng','Koguv66ndemoment_Tsum.png');
%print('-dfig','-landscape','-mono','-solid','Koguv66ndemoment_Tsum.fig');
%%print('-dfig','-solid','-landscape','-color','Koguv66ndemoment_Tsum.fig');
%%http://www.gnu.org/software/octave/doc/interpreter/Printing-Plots.html
refresh
%
%%%%%%%%%%%%%%%% 
Y10Y=FvvsT(6,i100);
Y20Y=FvvsT(6,i200);
Y30Y=FvvsT(6,i300);
Y40Y=FvvsT(6,i400);
Y525Y=FvvsT(6,i525);
Y65Y=FvvsT(6,i650);
Y775Y=FvvsT(6,i775);
Y90Y=FvvsT(6,i900);
%%%%%%%%%%%%%%%% 
X100=[X10X;X10X];
Y100=[0.0;Y10Y];
   X200=[X20X;X20X];
   Y200=[0.0;Y20Y];
 X300=[X30X;X30X];
 Y300=[0.0;Y30Y];
   X400=[X40X;X40X];
   Y400=[0.0;Y40Y];
 X525=[X525X;X525X];
 Y525=[0.0;Y525Y];
   X650=[X65X;X65X];
   Y650=[0.0;Y65Y];
 X775=[X775X;X775X];
 Y775=[0.0;Y775Y];
   X900=[X90X;X90X];
   Y900=[0.0;Y90Y];
%%%%%%%%%%%%%%%%%   
JA=-0.075*L;
JL=L+0.075*L;
YAY=FvvsT(6,1);
 YLY=FvvsT(6,ViimaneX);
 X0=[0.0; 0.0];
 Y0=[0.0;  YAY];
 YAY=FvvsT(6,1);
 XL=[L; L];
 YL=[0.0; YLY];
% maxQgr=max(FvvsT(6,:));
 Xsuurus=size(Xloikes);
% FvvsT(6,:);
%%%%%%%%%   
figure(8)
%
  plot( X0,Y0,"3",Xloikes(1,:),FvvsT(6,:),"3",Xg,Yg,"3",XL,YL,"3",X100,Y100,"3",X200,Y200,"3",X300,Y300,"3",X400,Y400,"3",X525,Y525,"3",X650,Y650,"3",X775,Y775,"3",X900,Y900,"3")
grid("on")
% http://www.network-theory.co.uk/docs/octave3/octave_160.html
%grid("off")
%
ax = gca ();
set (ax, "outerposition", [ 0  0  1 0.55])
%
 axis([JA JL minTtgr maxTtgr], "ij")  % telgede piirid [Xalg Xlõpp Zalg Zlõpp]
 ax=gca();
   xticks(1,:)=0.0:jaotT:L;
 set (ax, "xtick", xticks)
title('Vabav66ndemoment Tsum ',"fontsize",10)
        xlabel('x [m]',"fontsize",10)
	ylabel('Tt [kNcm]',"fontsize",10)
%
%%print('-deps','Vabav66ndemoment_Tt.eps');
%%print('-dpng','Vabav66ndemoment_Tt.png');
%print('-dfig','-landscape','-mono','-solid','Vabav66ndemoment_Tt.fig');
%%print('-dfig','-solid','-landscape','-color','Vabav66ndemoment_Tt.fig');
%%http://www.gnu.org/software/octave/doc/interpreter/Printing-Plots.html
refresh
%
%%%%%%%%%%%%%%%% 
Y10Y=FvvsT(8,i100);
Y20Y=FvvsT(8,i200);
Y30Y=FvvsT(8,i300);
Y40Y=FvvsT(8,i400);
Y525Y=FvvsT(8,i525);
Y65Y=FvvsT(8,i650);
Y775Y=FvvsT(8,i775);
Y90Y=FvvsT(8,i900);
%%%%%%%%%%%%%%%% 
X100=[X10X;X10X];
Y100=[0.0;Y10Y];
   X200=[X20X;X20X];
   Y200=[0.0;Y20Y];
 X300=[X30X;X30X];
 Y300=[0.0;Y30Y];
   X400=[X40X;X40X];
   Y400=[0.0;Y40Y];
 X525=[X525X;X525X];
 Y525=[0.0;Y525Y];
   X650=[X65X;X65X];
   Y650=[0.0;Y65Y];
 X775=[X775X;X775X];
 Y775=[0.0;Y775Y];
   X900=[X90X;X90X];
   Y900=[0.0;Y90Y];
%%%%%%%%
JA=-0.075*L;
JL=L+0.075*L;
YAY=FvvsT(8,1);
 YLY=FvvsT(8,ViimaneX);
 X0=[0.0; 0.0];
 Y0=[0.0;  YAY];
 YAY=FvvsT(8,1);
 XL=[L; L];
 YL=[0.0; YLY];
% maxQgr=max(FvvsT(8,:));
 Xsuurus=size(Xloikes);
% FvvsT(8,:);
%%%%%%%%%   
figure(9)
%
  plot( X0,Y0,"3",Xloikes(1,:),FvvsT(8,:),"3",Xg,Yg,"3",XL,YL,"3",X100,Y100,"3",X200,Y200,"3",X300,Y300,"3",X400,Y400,"3",X525,Y525,"3",X650,Y650,"3",X775,Y775,"3",X900,Y900,"3")
grid("on")
% http://www.network-theory.co.uk/docs/octave3/octave_160.html
%grid("off")
%
ax = gca ();
set (ax, "outerposition", [ 0  0  1 0.55])
%
 axis([JA JL minTwgr maxTwgr+750], "ij")  % telgede piirid [Xalg Xlõpp Zalg Zlõpp]
 ax=gca();
   xticks(1,:)=0.0:jaotT:L;
 set (ax, "xtick", xticks)
title('Kooldumisv66ndemoment Tw ',"fontsize",10)
        xlabel('x [m]',"fontsize",10)
	ylabel('Tw [kNcm]',"fontsize",10)
%
%%print('-deps','Kooldumisv66ndemoment_Tw.eps');
%%print('-dpng','Kooldumisv66ndemoment_Tw.png');
%print('-dfig','-landscape','-mono','-solid','Kooldumisv66ndemoment_Tw.fig');
%%print('-dfig','-solid','-landscape','-color','Kooldumisv66ndemoment_Tw.fig');
%%http://www.gnu.org/software/octave/doc/interpreter/Printing-Plots.html
refresh
%
%%%%%%%%%%%%%%%% 
Y10Y=FvvsT(7,i100);
Y20Y=FvvsT(7,i200);
Y30Y=FvvsT(7,i300);
Y40Y=FvvsT(7,i400);
Y525Y=FvvsT(7,i525);
Y65Y=FvvsT(7,i650);
Y775Y=FvvsT(7,i775);
Y90Y=FvvsT(7,i900);
%%%%%%%%%%%%%%%% 
X100=[X10X;X10X];
Y100=[0.0;Y10Y];
   X200=[X20X;X20X];
   Y200=[0.0;Y20Y];
 X300=[X30X;X30X];
 Y300=[0.0;Y30Y];
   X400=[X40X;X40X];
   Y400=[0.0;Y40Y];
 X525=[X525X;X525X];
 Y525=[0.0;Y525Y];
   X650=[X65X;X65X];
   Y650=[0.0;Y65Y];
 X775=[X775X;X775X];
 Y775=[0.0;Y775Y];
   X900=[X90X;X90X];
   Y900=[0.0;Y90Y];
%%%%%%%%
JA=-0.075*L;
JL=L+0.075*L;
YAY=FvvsT(7,1);
 YLY=FvvsT(7,ViimaneX);
 X0=[0.0; 0.0];
 Y0=[0.0;  YAY];
 YAY=FvvsT(7,1);
 XL=[L; L];
 YL=[0.0; YLY];
% maxQgr=max(FvvsT(7,:));
 Xsuurus=size(Xloikes);
% FvvsT(7,:);
%%%%%%%%%   
figure(10)
%
  plot( X0,Y0,"3",Xloikes(1,:),FvvsT(7,:),"3",Xg,Yg,"3",XL,YL,"3",X100,Y100,"3",X200,Y200,"3",X300,Y300,"3",X400,Y400,"3",X525,Y525,"3",X650,Y650,"3",X775,Y775,"3",X900,Y900,"3")
grid("on")
% http://www.network-theory.co.uk/docs/octave3/octave_160.html
%grid("off")
%
ax = gca ();
set (ax, "outerposition", [ 0  0  1 0.55])
%
 axis([JA JL minBwgr maxBwgr+50000], "ij")  % telgede piirid [Xalg Xlõpp Zalg Zlõpp]
 ax=gca();
   xticks(1,:)=0.0:jaotT:L;
 set (ax, "xtick", xticks)
title('Bimoment Bw ',"fontsize",10)
        xlabel('x [m]',"fontsize",10)
	ylabel('B [Ncm2]',"fontsize",10)
%
%%print('-deps','Bimoment_Bw.eps');
%%print('-dpng','Bimoment_Bw.png');
%print('-dfig','-landscape','-mono','-solid','Bimoment_Bw.fig');
%%print('-dfig','-solid','-landscape','-color','Bimoment_Bw.fig');
%%http://www.gnu.org/software/octave/doc/interpreter/Printing-Plots.html
refresh
%
%%%%%%%%

%%%%%%%%% 
  
 