## yzmyv.m
function Myzx=yzmyv(baasi0,x,a,My,EJ)
# 
#  Fzx -The load vector  My 
#  in the tranfer matrix method   ZL - U*ZA =Myzx (the II sign convention).
#  http://digi.lib.ttu.ee/opik_eme/Ehitusmehaanika.pdf#page=396  page=694
#  EJ -  the bending stiffness of the element
#  x - coordinate
#  a - the point of load
#  My - the moment load in y direction
#  baasi0 - scaling multiplier for the displacements (io= EJo/lo)
#
##=========================================================================
## This Program is written by Andres Lahe,   1998-05-20
##                    e-mail: andres.lahe@ttu.ee
## LAST MODIFIED: Andres Lahe,   2009-02-13
## Copyright (c)  2004 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
##=========================================================================
##
#if nargin != 5
if ~(nargin==5)
error(' function yzmyv have wrong number of input arguments!') 
end
#
##
  xp=x-a;
 if xp>=0
  Myzx(1,1)=0.0;
  Myzx(2,1)=baasi0*My*xp^2/(2*EJ);
  Myzx(3,1)=-baasi0*My*xp/EJ;
  Myzx(4,1)=0.0;
  Myzx(5,1)=0.0;
  Myzx(6,1)=-My;
 else
  Myzx(1,1)=0;
  Myzx(2,1)=0;
  Myzx(3,1)=0;
  Myzx(4,1)=0;
  Myzx(5,1)=0;
  Myzx(6,1)=0;
 endif
 endfunction


