use the simplified model provided
declare some arrays x and y of size i for wind on the width and the length of the building
since all you need is the BASE shear and turning moments
write a function f which determines the total wind force given i and whether its a length of width (call it say L1 and L2)
write a function say g and h, given i, and either L1 or L2. which determines the total contributing moment (ie, use matrix multiplication of your f array with the height array (ie. height(i) = i*height of floor), or the total base shear (matrix inner product of f with ones)
might help if you know matlab though, this is pretty easy

edit: to make your life easier you might want to be careful when using loops instead of matrix multiplication. I cant say which one is easier but MM is much faster, although for your case this point is kind of moot
if you hate the way MM works on matlab you might consider using loops
This post was edited by madeinchinars on Jul 10 2013 10:36pm