## spESTGerberBeamQM.m
close all 
clear
## 
dbwhere(430)
disp('==================================================================')
disp(' spESTGerberBeamQM.m   ')
disp(' Analysis of a Gerber''s beam using the EST method. ')
disp(' The EST method finds the displacements and forces. ')
disp(' The equations matrix are non-symmetric sparse matrix. ')
## http://digi.lib.ttu.ee/opik_eme/slaidid/raamEST1en.pdf
##disp('  ')
disp('---  ')
##disp(' http://digi.lib.ttu.ee/opik_eme/slaidid/raamEST1en.pdf ')
disp(' http://digi.lib.ttu.ee/opik_eme/Ehitusmehaanika.pdf#page=419 ')
## GNU octave version >= 3.0.x
##=========================================================================
## This Program is written by Andres Lahe,   2010-07-16
##                    e-mail: andres.lahe@ttu.ee
## LAST MODIFIED: Andres Lahe,   2013-07-21
## Copyright (c)  2010 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
##=========================================================================
##
##siireVardaA
 eps1=0.000001;
 epsgraf=0.01;
 global spA 
 global X  
# global siireVardaA
disp('---  ')
disp(' daf -- the displacements and the forces at the ends of element. ')
disp(' The element of plane frame have 4 daf''s (2+2). ') 
disp(' The number of unknowns are 4*number_of_elements + number_of_support_reactions. ')
disp(' The matrices are assembled into compressed column sparse matrices. ')
disp('---  ')
disp('  ')
#---------  Number of frame nodes ----------
Number_of_beam_nodes=8  #8
                            SolmedeArv=Number_of_beam_nodes;
#---------  Number of elements ----------
Number_of_elements=7
                            ElementideArv=Number_of_elements;
#---------  Number of supports ----------
Number_of_support_reactions=5 #5
                            Ntoerkts=Number_of_support_reactions;
disp('  ')

spNNK=4*ElementideArv+Ntoerkts;
#==========
   The_number_of_unknowns_are=spNNK
disp('---  ')
#==========
#
EI=20000
GA=1.0*10^15;
F1=20;
F2=40;
F3=30;
F4=100;
F5=20;
qz=8.0;
#
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
disp(' The displacements and the forces calculated on the parts of the element ''Nmitmeks''.  ')
Nmitmeks=4
Lp=31; # graphics axis
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
##Fjoud=esFjoud(:,1:2,i);
#Fjoud=esFjoud(:,1:3,i);
##qkoormus=esQkoormus(:,1:3,i); 
#qkoormus=esQkoormus(:,1:4,i);
##%%%%%%%%%%%%%%%%%%%%%%%%%%%%
## ---- load variants -----
load_variant=1
#load_variant=2
#load_variant=3
        koormusvariant=load_variant
###koormusvariant=2

###koormusvariant=3
##%%%%%%%%%%%%%%%%%%%%%%%%%%%%
switch (koormusvariant)
case{1}
#
disp(' The load variant 1 ')
#disp(' Element load  in local coordinates ')
#disp('    qz     qA      qL ')
# The uniformly distributed load in local coordinate z direction kN/m^2
LoadsqONelement=4;
esQkoormu=zeros(LoadsqONelement,3,ElementideArv);
esQkoormus(1,1:3,1)=[0.0 0.0 4.0];
esQkoormus(1,1:3,2)=[qz 0.0 8.0];
esQkoormus(1,1:3,3)=[qz 0.0 2.0];
esQkoormus(1,1:3,4)=[qz 0.0 6.0];
esQkoormus(1,1:3,5)=[0.0 0.0 2.0];
esQkoormus(1,1:3,6)=[0.0 0.0 8.0];
esQkoormus(1,1:3,7)=[0.0 0.0 1.0];
esQkoormus
# 
# The point load in local coordinate z and x direction  kN
#  Fz, aF - the coordinate of the point of force application
LoadsF_on_Element=5; 
esFjoud=zeros(LoadsF_on_Element,2,ElementideArv);
esFjoud(1,1:2,1)=[0.0 4.0];
esFjoud(1,1:2,2)=[F2 4.0];
#esFjoud(2,1:2,2)=[0.0 0.0]; 
esFjoud(1,1:2,3)=[0.0 2.0]; 
esFjoud(1,1:2,4)=[F3 2.0];
esFjoud(1,1:2,5)=[0.0 2.0]; 
esFjoud(1,1:2,6)=[F4 4.0];
esFjoud(1,1:2,7)=[0.0 1.0];
#esFjoud

#disp(' Node forces in global  coordinates ')
# sSolmF(forces,1,nodes); forces=[Fz; My]
sSolmF = zeros(2,1,SolmedeArv);
#sSolmF(:,1,1)= 0.0;
sSolmF(1,1,2)= 20.0;
#sSolmF(:,1,3)= 0.0;
#sSolmF(:,1,4)= 0.0
#sSolmF(:,1,5)= 0.0
#sSolmF(:,1,6)= 0.0
#sSolmF(:,1,7)= 0.0
sSolmF(1,1,8)= 20.0;
#%disp(' Kustuta ')
     s1F(:,:) = sSolmF(:,1,1);
     s2F(:,:) = sSolmF(:,1,2);
     s3F(:,:) = sSolmF(:,1,3);
     s4F(:,:) = sSolmF(:,1,4);
     s5F(:,:) = sSolmF(:,1,5);
     s6F(:,:) = sSolmF(:,1,6);
     s7F(:,:) = sSolmF(:,1,7);
     s8F(:,:) = sSolmF(:,1,8);          
#%%%%%
case{2}
disp(' The load variant 2 ')
case{3}
disp(' The load variant 3 ')
#%%%%%
otherwise
disp(' No load variant cases ')
endswitch 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 disp(' Elements loads q in local coordinates ')
#%%%qz=qzZ'
#%%%qx=qxZ'
disp(' qz, qA, qL  ')
disp('  For the element load q = 0,  qL = L - the end of element  ')
esQkoormus
disp(' Elements forces F  in local coordinates  ')
#%%%Fz=FZz'
esFjoud
disp(' Fz, aF -- coordinate of the point of force F  application in local coordinates ')
#disp(' x = aL -- coordinate of the point of force F  application in local coordinates ')
disp(' For the element force F = 0,  aL = L - the end of element  ') 
#%aL=aLXx'
esFjoud
#%%%
#disp(' Node 2 forces in global  coordinates ')
#sSolmF(:,:,2)
#%s2F'
#disp(' Node 4 forces in global  coordinates ')
#sSolmF(:,:,4)
#%s4F'
#disp(' Node 6 forces in global  coordinates ')
#sSolmF(:,:,6)
#s6F'
disp('------  ')
disp(' Node forces in global  coordinates ')
disp(' Fz My; : ; Node number; ')
disp('------  ')
sSolmF(:,1,:)=sSolmF(:,1,:)
#
#==========
# Nodal coordinates
#==========
krdn=[#	 x
        0.0  ; # node 1
        4.0  ;	# node 2
       12.0  ;	# node 3	
       14.0  ;	# node 4	
       20.0  ;	# node 5
       22.0  ;	# node 6
       30.0  ;	# node 7      
       31.0 ];	# node 8
#==========       
 # disp(' Nr      toel  u  w  fi  N   Q   M ')      
#==========
#  The restrtictions on the support displacements.
# Support  Nr    w  fi   hold on - 1, open - 0
#==========       
tsolm=[1    1 1  ;	# node 1
       3    1 0  ;	# node 2
       6    1 0  ;	# node 3
       7    1 0  ];	# node 4      
#==========
 # ------------- Element properties, topology and hinges ---------
#-----------------------
elasts=[# Element, 
#  n2 - end of the element, 
#       n1 - beginning of the element,
#             Q, M hinges at end of the element
#                    Q, M hinges at beginning of the element. 
   2     1    0 1    0 0;    % element 1
   3     2    0 0    0 1;    % element 2
   4     3    0 1    0 0;    % element 3
   5     4    0 1    0 1;    % element 4
   6     5    0 0    0 1;    % element 5
   7     6    0 0    0 0;    % element 6	
   8     7    0 0    0 0];   % element 7   
# 1-hinge 'true' (axial-, shear-, moment hinge)
#      
#========== 

#==========
SARV=size(krdn);
NSARV=SARV(1,1);
#%%%%%%%%%%%%
for i=1:NSARV
sJrN(i)=i;
end
#
sJrNT=sJrN';
#%%%%%%%%%%%
#disp('-----------------------------')
disp('===============================')
disp(' Nodal coordinate ')
disp('  Node    X           ')
disp('-----------------------------')
#disp([krdn])
for i=1:NSARV
disp(sprintf('  %2i    %7.4f  %7.4f',sJrNT(i),    krdn(i,1)))
endfor
disp('-----------------------------')
#%%%
if ((SolmedeArv-NSARV) != 0)
disp(' ')
disp(' ------- ')
disp(' ')
Number_of_beam_nodes
Error_by_nodes_input=sprintf('Number of nodes must be, but is: %d, %d', SolmedeArv, NSARV)
disp(' ')
error(' Error by nodes input.')
endif
#%%% value 11 out of bound 8

disp('===============================================')
disp('        Topology and  hinges. ')
disp('  End of the element, beginning of the element,  ')
disp('  shear-, moment hinge; 1 - hinge ''true'' ')
disp('-----------------------------------------------')
elemkinni=elasts(:,1:6);
Topology_and_and_hinges=elemkinni
EARV=size(elemkinni);
NEARV=EARV(1,1);
NEARV;
#
#%%%%%%%%%%%%%%%%%%%%
# --------The displacements and the forces numbers at the end and beginning of element.  ----- -----
slmnr=0;
for i=1:NEARV
 for j=1:4
   slmnr=slmnr+1;
   selemjln(i,j)=slmnr;
 endfor
endfor
#
disp('====================================================')
disp('  The displacements and the forces numbers (daf''s) ')
disp('  at the end and at the beginning of elements.  ')
disp('----------------------------------------------------')
selemjln;
The_displacements_and_the_forces_numbers=selemjln
#value 23 out of bound 14
selemjl=[selemjln elasts];
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#selemjl=[1   2   3   4    2  1;  # element 1    
#         5   6   7   8    3  2;  # element 2  
#         9  10  11  12    4  3;  # element 3  
#        13  14  15  16    5  4;  # element 4  
#        17  18  19  20    6  5;  # element 5  
#        21  22  23  24    7  6;  # element 6  
#        25  26  27  28    8  7 ]; # element 7

#1:23-6
selem=[selemjl(:,1:10)];
#selem=[selemjl(:,1:14)];
#selem=[selemjl(:,1:23)];
#EARV=size(selem);
#NEARV=EARV(1,1);
#%%%%%%%%%%%%
for i=1:NEARV
JrN(i,1)=i;
endfor
#
JrNT=JrN';
#%%%%%%%%%%%
disp('===========================================================================================')
disp(' Topology of elements                                             Moment hinge             ')
disp('                                                                  Node number   ''true''=1 ')
disp(' Nr.  At the end:  Q, M   At the beginning: Q, M   End Beginning            ')
disp('-------------------------------------------------------------------------------------------')
#
for i=1:NEARV
disp(sprintf('  %2i     %2i   %2i           %2i   %2i                 %2i    %2i       %2i    %2i ',JrN(i,1),    selemjl(i,1), selemjl(i,2), selemjl(i,3),selemjl(i,4), ...
selemjl(i,5), selemjl(i,6), selemjl(i,8), selemjl(i,10)))
endfor
disp('--------------------------------------------------------------------------------------------')
#%%%value 17 out of bound 14
EARV=size(selem);
NEARV=EARV(1,1);
#%%%Number_of_frame_nodes
if ((ElementideArv-NEARV)  !=0 )
disp(' ')
disp(' ------- ')
disp(' ')
Number_of_elements
Error_by_elements_input=sprintf(' Number of elements must be, and is  %d, %d',ElementideArv,NEARV)
disp(' ')
error(' Error inserting the topology of elements.')
endif
#%%%
#==========
TSARV=size(tsolm);
NTSARV=TSARV(1,1);
#%%%%%%%%%%%%
for i=1:NTSARV
sJrN(i)=i;
end
#
sTJrNT=sJrN';
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#  The restrtictions on the support displacements.
# disp(' Nr      toel  u  w  fi  N   Q   M ')
%disp('--------------------------------')
disp('==================================================')
disp(' The restrtictions on the support displacements. ')
disp(' Nr    Node Nr    w  fi;  hold on-1, open-0')
disp('--------------------------------------------------')
#disp([tsolm])
for i=1:NTSARV
disp(sprintf('  %2i     %5i   %2i %2i %2i %2i %2i',sTJrNT(i),    tsolm(i,1), tsolm(i,2), tsolm(i,3)))
endfor
disp('--------------------------------------------------')
%%%
TOEARV=size(tsolm);
TOARV=TOEARV(1,1);
##%%%%%%%%%%%
ToeSidemeteArv=0;
for i=1:NTSARV
  for j=2:3
     if (tsolm(i,j) == 1)
       ToeSidemeteArv=ToeSidemeteArv+1;
     endif 
  endfor
endfor
#
#%%%
#ToeSidemeteArv
if ((Ntoerkts-ToeSidemeteArv)  !=0 )
disp(' ')
disp(' ------- ')
disp(' ')
Number_of_support_reactions
Error_by_inserting_support_reactions=sprintf('Number of support reactions must be, and is  %d, %d',Ntoerkts,ToeSidemeteArv)
disp(' ')
error(' Error inserting the restrtictions on the support displacements.')
endif
#
#%%%%%%%%%%%%
selem;
#
lvarras=VardaPikkusDT(NSARV,NEARV,krdn,selem);
#llvarras
#%%%%%%%%%%%
disp('   ')
NEARV;
NNK=4*NEARV+Ntoerkts;
#lvarras
#
selemjl;
#%disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ')
for i=1:NEARV
elemendiN(i,1)=i;
#siireVardaA(i,1:3)=selemjl(i,7:9);
#siireVardaL(i,1:3)=selemjl(i,1:3);
joudVardaA(i,1:2)=selemjl(i,3:4);
joudVardaL(i,1:2)=selemjl(i,1:2);
endfor
#
#siireVardaA;
#siireVardaL;
joudVardaA;
joudVardaL;
#%%%%%%%%%%%%
%%%%%ABB=ABB
#--------- Define a matrix spA to be sparse -----------
disp('-------- The sparse matrix instantiation --------  ')
disp('  spA=sparse(NNK,NNK)  ')
spA=sparse(NNK,NNK) % nullistan võrrandisüsteemi kordajate maatriksi
#--------- Define a vector B ------------
disp('-------- The right-hand side of the equations (RHS). --------  ')
disp('  B=zeros(NNK,1);  ')
B=zeros(NNK,1);   % nullistan võrrandisüsteemi vabaliikmed
disp('   ')
%%%%%%%%%%%%%%%%%%%%%%%%%
disp('  ')
disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ')
disp(' function AlgParm=LaheGerberBeamQM(Ntoerkts,esQkoormus,esFjoud,sSolmF,tsolm,krdn,selem) ')
disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ')
disp('  ')
AlgParm=LaheGerberBeamQM(Ntoerkts,esQkoormus,esFjoud,sSolmF,tsolm,krdn,selem);
disp('  ')
AlgPar=AlgParm;
disp('  ')
disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ')
disp(' The element forces  determinated by the transfer matrix ')
disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ')
disp('  ')
#-------------The element displacements and forces----------
#
#  suurused=[' displacement u - ';
#            ' displacement w - ';
#            ' rotation    fi - ';
#   suurused=[' normal force N - ';
  suurused=[' shear force  Q - ';
            ' moment force M - '];
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#i=1
for i=1:NEARV
   krda=i;
 qkoormus=zeros(1,3);
 Fjoud=zeros(1,2);   
 vF=zeros(2,4);
 Li=lvarras(i,1);
# 
Fjoud=esFjoud(:,1:2,i);
#Fjoud=esFjoud(:,1:3,i);
#%       Fz        aF
#%Fjoud=[0.0    0.0;
#
qkoormus=esQkoormus(:,1:3,i); 
#qkoormus=esQkoormus(:,1:4,i);
#%       qz       qA      qL
#%qkoormus=[0.0   0.0  0.0   0.0];     
   
   xsamm=Li/Nmitmeks; % element is divided into 4-th parts
   xx=0;
   AP=AlgPar(i,:)';
#---------The transfer matrix equation --------
     for ij=1:Nmitmeks+1  # 5 - displacements and forces at x=0.0
  vvF=ylSTfhlin(xx);
  vvB=ESTSTKrmus(xx,Li,Fjoud,qkoormus);
%
Fvv(:,ij)=vvF*AP+vvB;
       xx=xx+xsamm;
     endfor
#-------------The element displacements and forces---------- 
   #
   VardaNr=i;
   disp(sprintf('%13s %2i %15s %5.3f %2s', 'The forces of element nr',VardaNr,'  length of element ',Li,'m,  '))
   disp('    element is divided into 4-th parts  ')
#
#value 3 out of bound 2
     for i=1:2 
    disp(sprintf('%10s %8.3f  %8.3f  %8.3f  %8.3f  %8.3f',suurused(i,:), Fvv(i,1),   Fvv(i,2),   Fvv(i,3),  Fvv(i,4),  Fvv(i,5)))
    endfor
#
#
   #disp('  ')
#
      disp('-------------------------------------------------------------------')
#
endfor
#
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
disp('-------------------------------------')
SsjoudGrbrTalaPnktis(4,2.0-eps1,AlgPar,lvarras,esFjoud,esQkoormus,suurused);
SsjoudGrbrTalaPnktis(4,2.0,AlgPar,lvarras,esFjoud,esQkoormus,suurused);
disp('-------------------------------------')
SsjoudGrbrTalaPnktis(2,4.0-eps1,AlgPar,lvarras,esFjoud,esQkoormus,suurused);
disp('-------------------------------------');
SsjoudGrbrTalaPnktis(6,4.0-eps1,AlgPar,lvarras,esFjoud,esQkoormus,suurused);
%SsjoudGrbrTalaPnktis(VardaNr,X,AlgPar,lvarras,esFjoud,esQkoormus,suurused);
disp('-------------------------------------');
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#%%%%%%%%%%%%
for i=1:NEARV
LkoordN=selem(i,5);
AkoordN=selem(i,6);
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);
VGRz(i,1)=0.0;
VGRz(i,2)=0.0;
endfor
#
#%%%%%%%%%%%%
figure(1)
ax = gca ();
d=10.0;
Ls=Lp;
%
grid off
%
%
for j=1:NEARV
       IR=j;
 % 
     axis([-d  Ls+d -20 8], "ij")
 %
plot(VGRx(IR,:),VGRz(IR,:),"3")
hold on
endfor
%
jaotT=5;
%
title('spESTGerberBeamQM',"fontsize",12)
ax=gca();
      xlabel('x',"fontsize",12)
      ylabel('z',"fontsize",12)
 xticks(1,:)=-d:jaotT:Ls+d;
 set (ax, "xtick", xticks)
%
%%Node numbers
TTT=' ';
TST=' ';
TT1=' ';
TT1=' ';
%%%%%%%%%%
for i=1:NSARV;
%
   IR=i;
   TTT=eval(sprintf('%i',IR));
   TST=int2str(TTT);
 
%text(krdn(IR,1), krdn(IR,2)+0.17, TST)
text(krdn(IR,1), 0.25, TST)
%text(krdn(IR,1), krdn(IR,2)+0.25, TST)
%
endfor
%
%%% element numbers
for j=1:NEARV;
%
   IR=j;
   TTT=eval(sprintf('%i',IR));
   TST=int2str(TTT);
text((VGRx(IR,1)+VGRx(IR,2))/2+0.1, (VGRz(IR,1)+VGRz(IR,2))/2, TST)
%
endfor
%text(L/2-d/2, -H-d/2, 'Talaskeem')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
xvalg=5.0;
yvalg=-15.0;
sammuga=1.0;
text(0.0, yvalg-1.5*sammuga, 'The forces numbers (daf''s)  ')
%TSA=[TSA1 Tyhk TSA2 Tyhk TSA3] ; 
text(-1.0, yvalg, 'Q M at the beginning')
%%xvalg=xvalg+sammuga;
yvalg=yvalg+sammuga;
for i=1:NEARV;
%joudVardaA(i,1:2)
TTA1=eval(sprintf('%3i',joudVardaA(i,1)));
TTA2=eval(sprintf('%3i',joudVardaA(i,2)));
   TSA1=int2str(TTA1);
   TSA2=int2str(TTA2);   
   Tyhk='  ';
TSA=[TSA1 Tyhk TSA2] ; 
text(xvalg, yvalg, TSA)
%%xvalg=xvalg+sammuga;
yvalg=yvalg+sammuga;
endfor
yvalg=yvalg+sammuga;
text(0.0, yvalg, 'The support reactions: 29 30 31 32 33 ')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
xvalg=23.0;
yvalg=-15.0;
sammuga=1.0;
%TSA=[TSA1 Tyhk TSA2 Tyhk TSA3] ; 
text(20.0, yvalg, 'Q M at the end')
%%xvalg=xvalg+sammuga;
yvalg=yvalg+sammuga;
for i=1:NEARV;
%joudVardaA(i,1:2)
TTA1=eval(sprintf('%3i',joudVardaL(i,1)));
TTA2=eval(sprintf('%3i',joudVardaL(i,2)));
   TSA1=int2str(TTA1);
   TSA2=int2str(TTA2);   
   Tyhk='  ';
TSA=[TSA1 Tyhk TSA2] ; 
text(xvalg, yvalg, TSA)
%%xvalg=xvalg+sammuga;
yvalg=yvalg+sammuga;
endfor
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
hold off
%%%%%%
%axis([-d L+d 1.0 -H-2.0], "ij")
pause (1)
%
%Vaata: http://www.gnu.org/software/octave/doc/interpreter/Printing-Plots.html
%
%print('-deps','spESTGerberBeamQM.eps');
%print('-dpng','spESTGerberBeamQM.png');
print('-dfig','-landscape','-mono','-solid','spESTGerberBeamQM.fig');
refresh
%
%pause (1) % octave
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%pause(1)
figure(2)
spy(spA)
title('spy(spA) - the sparse matrix spA(33,33) non zero elements [6.2%] ')
refresh
%
%print('-deps','spESTGerberBeamQM_sparse.eps');
%print('-dpng','spESTGerberBeamQM_sparse.png');
print('-dfig','-landscape','-mono','-solid','spESTGerberBeamQM_sparse.fig');
%refresh
%
%
#disp('-----------------------------------')
disp('  ')
disp(' The END ')
#%%%%%%%%%%%%%%%