TREBALL FINAL DE GRAU

Similar documents
Signal and Systems. Matlab GUI based analysis. XpertSolver.com

% Edit the above text to modify the response to help Video_Player. % Last Modified by GUIDE v May :38:12

LAMPIRAN 1. Percobaan

1. Peralatan LAMPIRAN

% Edit the above text to modify the response to help Principal

GUI code for different sections is in following sections

Homeworks on FFT Instr. and Meas. for Communication Systems- Gianfranco Miele. Name Surname

LISTING PROGRAM. % Edit the above text to modify the response to help cover. % Last Modified by GUIDE v Jun :24:43

Ear Recognition. By: Zeyangyi Wang

LISTING PROGRAM. % UIWAIT makes pertama wait for user response (see UIRESUME) % uiwait(handles.figure1);

Akkad Bakad Bambai Bo

1.Matlab Image Encryption Code

Lampiran 1. Script M-File Global Ridge

Supplementary Information

We are IntechOpen, the world s leading publisher of Open Access books Built by scientists, for scientists. International authors and editors

OMR Sheet Recognition

Lithium-Ion Battery Data. Management

% --- Executes on button press in btn_gsn. function btn_gsn_callback(hobject, eventdata, handles) GaussianSpeckleNoise close AiSoftware;

A NEW MACHINING COST CALCULATOR (MC 2 )

MV 1:00 1:05 1:00 1:05

Solving Sudoku with MATLAB

LAMPIRAN A PROGRAM PELATIHAN DAN PENGUJIAN

LAMPIRAN LISTING PROGRAM

COMPLETELY AUTOMATED PUBLIC TURING TEST TO TELL COMPUTERS AND HUMANS APART

Finding a Minimum Covering Circle Based on Infinity Norms

LISTING PROGRAM. if nargout [varargout{1:nargout}] = gui_mainfcn(gui_state, varargin{:}); else gui_mainfcn(gui_state, varargin{:}); end

Contents INTERFACING MATLAB WITH EMBEDDED SYSTEMS

ECE Fall 05. Undergraduate Research: Digital Signal Processing & Quantization Effects

Airfoil Boundary Layer Separation Prediction

PROGRAMMING IN MATLAB

Parallel-connected solar arrays

LAMPIRAN A LISTINGPROGRAM

.., 7. References. [ 1] 1 mage Analysis and Mathematical Morphology:J.Serra. [2] Erosion, dilation and related operators,by Mariusz Jankowski

ALGORITHMS AND INTERFACE FOR OCEAN ACOUSTIC RAY-TRACING (Developed in MATLAB)

Main Form visual Studio

GUI Signal Analysis and Filtering Design

Finite Element Analysis Dr. B. N. Rao Department of Civil Engineering Indian Institute of Technology Madras. Module - 01 Lecture - 15

Accepted by... John H. Lienhard V

Exercise Set Decide whether each matrix below is an elementary matrix. (a) (b) (c) (d) Answer:

Implementation of a Motion Detection System

Introduction to. The Help System. Variable and Memory Management. Matrices Generation. Interactive Calculations. Vectors and Matrices

Spring 2010 Instructor: Michele Merler.

LESM. Linear Elements Structure Model. Version 1.0 August Luiz Fernando Martha

IMAGE STEGANOGRAPHY USING DISCRETE COSINE TRNASFORM ALGORITHM

MATLAB. Creating Graphical User Interfaces Version 7. The Language of Technical Computing

LOK-Viewer : Graphical Interface Application for Geomagnetic Data in Observatory Geomagnetic Lombok

Real-Time IIR Digital Filters

COMP30019 Graphics and Interaction Three-dimensional transformation geometry and perspective

Preliminary remarks. Preliminary remarks. Preliminary remarks. CHAPTER 7 BM Analysis using Stiffness Method

MEASURING INTERFACIAL TENSION WITH THE PENDANT DROP METHOD

SECTION 2: PROGRAMMING WITH MATLAB. MAE 4020/5020 Numerical Methods with MATLAB

Chemical Engineering 541

midas Civil Advanced Webinar Date: February 9th, 2012 Topic: General Use of midas Civil Presenter: Abhishek Das Bridging Your Innovations to Realities

SETTLEMENT OF A CIRCULAR FOOTING ON SAND

Computer Graphics with OpenGL ES (J. Han) Chapter IV Spaces and Transforms

COMS 3101 Programming Languages: MATLAB. Lecture 2

Basic Elements. Geometry is the study of the relationships among objects in an n-dimensional space

Low-Level File I/O. 1. Open a file. 2. Read or write data into the file. 3. Close the file. Zheng-Liang Lu 1 / 14

Loads. Lecture 12: PRISMATIC BEAMS

Frame Analysis Using Visual Analysis

Practice Reading for Loops

3D Coordinate Transformation Calculations. Space Truss Member

Computational Methods of Scientific Programming

Geometry. Prof. George Wolberg Dept. of Computer Science City College of New York

Assignment #2: False Position Method

Working with Excel Files. a = round(rand(5,3)*100) xlswrite('rand.xlsx',a) b = xlsread('rand.xlsx')

UNIVERSITÀ DEGLI STUDI DI PADOVA

A METHOD TO MODELIZE THE OVERALL STIFFNESS OF A BUILDING IN A STICK MODEL FITTED TO A 3D MODEL

1. Carlos A. Felippa, Introduction to Finite Element Methods,

Introduction To MATLAB Interactive Graphics

Tutorial 1: Welded Frame - Problem Description

1 Lab 3, Simulation of crank-piston system

Ansys Lab Frame Analysis

Introduction to Finite Element Method

Design of Automated Digital Eye Palpation Exam for Intraocular Pressure Measurement

2 T. x + 2 T. , T( x, y = 0) = T 1

Pro MECHANICA STRUCTURE WILDFIRE 4. ELEMENTS AND APPLICATIONS Part I. Yves Gagnon, M.A.Sc. Finite Element Analyst & Structural Consultant SDC

BUILDING A MATLAB GUI. Education Transfer Plan Seyyed Khandani, Ph.D. IISME 2014

Flow Control and Functions

Transforms. COMP 575/770 Spring 2013

Beams. Lesson Objectives:

Keywords: Learning automata, Vertex multicoloring.

Lecture 5 2D Transformation

Basic MATLAB. Getting MATLAB (for MIT students) Creating matrices and vectors. Some operation of matrices/vectors.

Statics of the truss with force and temperature load - test problem Nr 1

Beyond the Mouse A Short Course on Programming

GENDER ESTIMATION BASED ON FACIAL IMAGE AZLIN BT YAJID UNIVERSITI TEKNOLOGI MALAYSIA

Example Cantilever beam

Application nr. 2 (Global Analysis) Effects of deformed geometry of the structures. Structural stability of frames. Sway frames and non-sway frames.

FEMAP Freebody Deep-Dive Patrick Kriengsiri, FEMAP Development

Jlinpro command glossary

Scout Optimization Algorithms

Access to Delimited Text Files

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

ixcube 4-10 Brief introduction for membrane and cable systems.

In part 2, we demonstrate the following additional topics:

Still More About Matlab GUI s (v. 1.3) Popup Menus. Popup Menu Exercise. Still More GUI Info - GE /29/2012. Copyright C. S. Tritt, Ph.D.

C O M P U T E R G R A P H I C S. Computer Graphics. Three-Dimensional Graphics I. Guoying Zhao 1 / 52

Introduction to Matlab

MATLAB for the Sciences

Transcription:

Estudi del procés constructiu de ponts atirantats construïts sobre suports provisionals. ANNEXOS Treball realitzat per: Joan Fraile Diana Dirigit per: José Turmo Coderque Jose Antonio Lozano Galant Grau en: Enginyeria Civil Barcelona, 20 de Setembre de 2017 Departament d Enginyeria de la Construcció TREBALL FINAL DE GRAU

Estudi del procés constructiu de ponts atirantats construïts sobre suports provisionals Joan Fraile Diana Grau en Enginyeria Civil

Estudi del procés constructiu de ponts atirantats sobre suports Autor: Joan Fraile Diana Annex 1 Codi MATLAB per esforços en barres i

5/09/17 16:51 C:\Users\caminstech...\VectorNodalForces.m 1 of 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % STIFFNESS METHOD FOR SOLVING STRUCTURES (PORTAL2) % % % % JOAN FRAILE DIANA % % % % DISSERTATION PROJECT FOR BACHELOR IN CIVIL ENGINEERING % % POLYTECHNIC UNIVERSITY OF CATALONIA, YEAR 2016-2017 % % % % % % Latest version 15 of August 2017 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % That script converts the uniform distributed loads into loads aplied on % the nodes of the studied structure and it adds together with the node % loads applied to the structure. function [NodalForces]=VectorNodalForces global knownux1ux2uy1uy2uz1uz2umxumyumz global valueux1ux2uy1uy2uz1uz2umxumyumz global knownfx1fy1fz1mx1my1mz1fx2fy2fz2mx2my2mz2 global valuefx1fy1fz1mx1my1mz1fx2fy2fz2mx2my2mz2 L=16; knownux1ux2uy1uy2uz1uz2umxumyumz={[1]; [1]; [1]; [1]; [1]; [1]; [1]; [1]; [1]}; valueux1ux2uy1uy2uz1uz2umxumyumz={[0]; [0]; [0]; [0]; [-205]; [-205]; [0]; [0]; [0]}; knownfx1fy1fz1mx1my1mz1fx2fy2fz2mx2my2mz2={[1]; [1]; [1]; [1]; [1]; [1]; [1]; [1]; [1]; [1]; [1]; [1]}; valuefx1fy1fz1mx1my1mz1fx2fy2fz2mx2my2mz2={[0]; [0]; [0]; [0]; [0]; [0]; [0]; [0]; [0]; [0]; [0]; [0]}; Muxx1=(-(-L^2/60)*(3*valueux1ux2uy1uy2uz1uz2umxumyumz{1} +2*valueux1ux2uy1uy2uz1uz2umxumyumz{2})+valueFx1Fy1Fz1Mx1My1Mz1Fx2Fy2Fz2Mx2My2Mz2{4}); Muxx2=(-(-L^2/60)*(2*valueux1ux2uy1uy2uz1uz2umxumyumz{1} +3*valueux1ux2uy1uy2uz1uz2umxumyumz{2})+valueFx1Fy1Fz1Mx1My1Mz1Fx2Fy2Fz2Mx2My2Mz2 {10}); Ruxx1=(-(L/6)*(2*valueux1ux2uy1uy2uz1uz2umxumyumz{1}+valueux1ux2uy1uy2uz1uz2umxumyumz {2})-((Muxx1-Muxx2)/L)+valueFx1Fy1Fz1Mx1My1Mz1Fx2Fy2Fz2Mx2My2Mz2{1}); Ruxx2=(-(L/6)*(valueux1ux2uy1uy2uz1uz2umxumyumz{1}+2*valueux1ux2uy1uy2uz1uz2umxumyumz {2})-((Muxx1-Muxx2)/L)+valueFx1Fy1Fz1Mx1My1Mz1Fx2Fy2Fz2Mx2My2Mz2{7}); Muyy1=(-(-L^2/60)*(3*valueux1ux2uy1uy2uz1uz2umxumyumz{3} +2*valueux1ux2uy1uy2uz1uz2umxumyumz{4})+valueFx1Fy1Fz1Mx1My1Mz1Fx2Fy2Fz2Mx2My2Mz2{5}); Muyy2=(-(-L^2/60)*(2*valueux1ux2uy1uy2uz1uz2umxumyumz{3} +3*valueux1ux2uy1uy2uz1uz2umxumyumz{4})+valueFx1Fy1Fz1Mx1My1Mz1Fx2Fy2Fz2Mx2My2Mz2 {11}); Ruyy1=(-(L/6)*(2*valueux1ux2uy1uy2uz1uz2umxumyumz{3}+valueux1ux2uy1uy2uz1uz2umxumyumz {4})-((Muyy1-Muyy2)/L)+valueFx1Fy1Fz1Mx1My1Mz1Fx2Fy2Fz2Mx2My2Mz2{2}); Ruyy2=(-(L/6)*(valueux1ux2uy1uy2uz1uz2umxumyumz{3}+2*valueux1ux2uy1uy2uz1uz2umxumyumz {4})-((Muyy1-Muyy2)/L)+valueFx1Fy1Fz1Mx1My1Mz1Fx2Fy2Fz2Mx2My2Mz2{8}); Muzz1=(-(-L^2/60)*(3*valueux1ux2uy1uy2uz1uz2umxumyumz{5} +2*valueux1ux2uy1uy2uz1uz2umxumyumz{6})+valueFx1Fy1Fz1Mx1My1Mz1Fx2Fy2Fz2Mx2My2Mz2{6}); Muzz2=(-(-L^2/60)*(2*valueux1ux2uy1uy2uz1uz2umxumyumz{5} +3*valueux1ux2uy1uy2uz1uz2umxumyumz{6})+valueFx1Fy1Fz1Mx1My1Mz1Fx2Fy2Fz2Mx2My2Mz2 {12}); Ruzz1=(-(L/6)*(2*valueux1ux2uy1uy2uz1uz2umxumyumz{5}+valueux1ux2uy1uy2uz1uz2umxumyumz {6})-((Muzz1-Muzz2)/L)+valueFx1Fy1Fz1Mx1My1Mz1Fx2Fy2Fz2Mx2My2Mz2{3});

5/09/17 16:51 C:\Users\caminstech...\VectorNodalForces.m 2 of 2 Ruzz2=(-(L/6)*(valueux1ux2uy1uy2uz1uz2umxumyumz{5}+2*valueux1ux2uy1uy2uz1uz2umxumyumz {6})-((Muzz1-Muzz2)/L)+valueFx1Fy1Fz1Mx1My1Mz1Fx2Fy2Fz2Mx2My2Mz2{9}); NodalForces=[Ruxx1; Ruxx2; Ruyy1; Ruyy2; Ruzz1; Ruzz2; Muxx1; Muxx2; Muyy1; Muyy2; Muzz1; Muzz2]; %Plotting information fid=fopen('nodalforces.txt','wt'); fprintf(fid,' fx1= %d\n fx2= %d\n fy1= %d\n fy2= %d\n fz1= %d\n fz2= %d\n mx1= %d\n mx2= %d\n my1= %d\n my2= %d\n mz1= %d\n mz2= %d\n', NodalForces); fclose(fid);

Estudi del procés constructiu de ponts atirantats sobre suports Autor: Joan Fraile Diana Annex 2 Codi MATLAB espacial ii

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 1 of 26 function varargout = Portal2(varargin) % PORTAL2 MATLAB code for Portal2.fig % PORTAL2, by itself, creates a new PORTAL2 or raises the existing % singleton*. % % H = PORTAL2 returns the handle to a new PORTAL2 or the handle to % the existing singleton*. % % PORTAL2('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in PORTAL2.M with the given input arguments. % % PORTAL2('Property','Value',...) creates a new PORTAL2 or raises the % existing singleton*. Starting from the left, property value pairs are % applied to the GUI before Portal2_OpeningFcn gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to Portal2_OpeningFcn via varargin. % % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one % instance to run (singleton)". % % See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to help Portal2 % Last Modified by GUIDE v2.6 22-AUG-2017 11:26h % Begin initialization code - DO NOT EDIT gui_singleton = 1; gui_state = struct('gui_name', mfilename,... 'gui_singleton', gui_singleton,... 'gui_openingfcn', @Portal2_OpeningFcn,... 'gui_outputfcn', @Portal2_OutputFcn,... 'gui_layoutfcn', [],... 'gui_callback', []); if nargin && ischar(varargin{1}) gui_state.gui_callback = str2func(varargin{1}); if nargout [varargout{1:nargout}] = gui_mainfcn(gui_state, varargin{:}); gui_mainfcn(gui_state, varargin{:}); % End initialization code - DO NOT EDIT % --- Executes just before Portal2 is made visible. function Portal2_OpeningFcn(hObject, eventdata, handles, varargin) % This function has no output args, see OutputFcn. % hobject handle to figure % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % varargin command line arguments to Portal2 (see VARARGIN) clc, diary off %--- Centers the interface

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 2 of 26 scrsz=get(0,'screensize'); %screen size [x0,y0,width,high] act_pos=get(gcf,'position'); xp=round((scrsz(3)-act_pos(3))/2); yp=round((scrsz(4)-act_pos(4))/2); set(gcf,'position',[xp yp act_pos(3) act_pos(4)]) % Choose default command line output for Portal2 handles.output = hobject; % Update handles structure guidata(hobject, handles); % UIWAIT makes Portal2 wait for user response (see UIRESUME) % uiwait(handles.figure1); % --- Outputs from this function are returned to the command line. function varargout = Portal2_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT); % hobject handle to figure % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Get default command line output from handles structure varargout{1} = handles.output; %--- --- --- --- --- --- FULL OBSERVABILITY PACKAGE--- --- --- --- --- ---% % In this program, "Iz" is "EIz", Iy is "EIy" and "A" is "EA" % %--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- % % INITIAL DATA ------------------------------------------------------------ % a) load example and plot ----------------------------------------------- function Select_Example_Callback(hObject, eventdata, handles) global Example ScreenOption global nodecoordinates beams global nnodes nbeams theta beamlength nsize global DisplaNames ForcesNames Shearrotation v %--- Selects the file to import_data and loads posible examples [FileName,PathName,res_ok]=uigetfile('*.m','Open a data file'); if res_ok pathf=[pathname FileName]; FileName=FileName(1:-2); cases={}; %--- Read the posible cases fid=fopen(pathf, 'r'); try while ~feof(fid) %read line by line tline = fgetl(fid); %reads the next line if strfind(tline,'case') %find the word 'case' pos=strfind(tline,''''); %find the '' aux=tline(pos(1)+1:pos(2)-1); cases=[cases, aux];

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 3 of 26 fclose(fid); if ~isempty(cases) %--- Show these cases. When there is a selection, export_data the data [NExample,ok]=listdlg('PromptString','Select a case:','selectionmode','single','listsize',[350 300],'ListString',cases); if ok Example=sprintf('''%s''',char(cases(NExample))); set(handles.title, 'String', upper(cases(nexample))) eval(sprintf('%s(%s)',filename,example)) return %--- Clear previous calculus clearportal('nivel0',handles) %--- Updates the menu visibility set(handles.select_example, 'Check', 'on'); set(handles.direct_analysis, 'Enable', 'on'); set(handles.export_data, 'Enable', 'on'); set(handles.import_data, 'Enable', 'on'); cla(handles.squeme,'reset'); set(handles.squeme,'visible', 'off'); %--- Some options choice = questdlg('select a type of report','report','only summary','on screen','plotting for latex','only summary'); switch choice case 'Only summary' ScreenOption=0; case 'On screen' ScreenOption=1; case 'Plotting for latex' ScreenOption=2; %plotting for latex beams); squeme) %--- Initial evaluations PrepareReport2(Example); [nnodes,nbeams,theta,beamlength,nsize]=evaluategeneralinfo2(nodecoordinates, %PlotNetwork2(Example,beams,nodecoordinates,nnodes,nbeams,theta,handles. %CheckData2(nbeams) [ForcesNames,DisplaNames]=ForcesandDisplacements2(nnodes); Shearrotation=0; %--- Poisson v=0.25; warndlg('this file does not contain this kind of data.','error in Open File','modal');

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 4 of 26 % b) DIRECT ANALYSIS ------------------------------------------------------ function Direct_Callback(hObject, eventdata, handles) global beams nnodes nbeams beamlength nsize nodecoordinates global measur_values reactions theta Shearrotation %--- "Calculating" bar h = waitbar(1,'calculating. Please wait...'); set(findobj(h,'type','patch'),'edgecolor','b','facecolor','b') for i=1:50 waitbar(i/100) %--- Calculate the stiffness matrix solution [measur_values,reactions]=stiffnessmatrixsolution2(beams,beamlength,nnodes,nbeams, nsize,nodecoordinates,theta); %--- Updates the menu visibility set(handles.measurements, 'Enable', 'on'); set(handles.loads, 'Enable', 'on'); set(handles.measurements, 'Check', 'off'); set(handles.loads, 'Check', 'off'); set(handles.enable, 'Check', 'on'); set(handles.shear_rotation, 'Check', 'off'); set(handles.perform_analysis, 'Check', 'on'); set(handles.h_displacements, 'Enable', 'on'); set(handles.h_displacements, 'Check', 'off'); set(handles.select_measurements, 'Enable', 'off'); set(handles.results_panel, 'Visible', 'off'); set(handles.execute, 'Enable', 'off'); Shearrotation=0; %--- "Calculating" bar for i=51:100 waitbar(i/100) pause(0.75) close(h) % c) CALCULUS ------------------------------------------------------------- function Execute_Callback(hObject, eventdata, handles) global beams nodecoordinates global ScreenOption global nnodes nbeams theta beamlength nsize global error global ForcesNames Measurement_set %--- Error input ok=0; while ~ok % a) ask for data prompt={'error: if exist('error','var')&& ~isempty(error) defaultvalue={num2str(error,'%-8.4e')}; '};

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 5 of 26 defaultvalue={'1e-14'}; answer_str = inputdlg(prompt,'error value',1,defaultvalue); % b) transform to number aux=str2double(answer_str); if isempty(aux) return if isnumeric(aux)&& aux>0 error=aux; ok=1; % c.1) change the default answer defaultanswer=answer_str; %--- "Calculating" bar h = waitbar(1,'calculating. Please wait...'); set(findobj(h,'type','patch'),'edgecolor','b','facecolor','b') for i=1:50 waitbar(i/100) %--- Create the modify stiffness matrix, the variable names associated with the GSM and vector of forces GSM=AssemblingModifiedStiffnessMatrixNEW2(beams,beamlength,nodecoordinates,nnodes, nbeams,nsize); [GSM,GSMVarsNames]=CreateGSMVarNames2(GSM,nsize,nbeams,beams); ForcesNames=CreateForcesVector2(nnodes); %--- Identify the known variables and impose the boundary conditions [KnownName,valuevars]=ReadKnownVars2(ForcesNames,nnodes,nbeams); [GSM,GSMVarsNames,KnownForces,KnownForcesValues]=BoundaryCond2(GSM,GSMVarsNames, ForcesNames,KnownName,valuevars); %--- Rearranging the system of equations B.z=d [B,z,d]=BuildMatrixB2(GSM,GSMVarsNames,ForcesNames,KnownForces,KnownForcesValues); %--- Compute the numeric result [Cumvars,Cumres]=EvalRes2(B,z,d); %--- Display the measurement set n=length(cumvars); if n==0 fprintf('\n ERROR --> No results obtained \n \n'); % RES=cell(n,2); % RES(:,1)=Cumvars; % for i=1:n % RES{i,2}=Cumres(i); % % % % b) loads data in table % set(handles.resvars_table, 'Data', RES);

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 6 of 26 %--- Close figure try close Measurements %--- Updates the menu visibility set(handles.results_panel, 'Visible', 'on'); set(handles.measurements_name, 'Data', Measurement_set); set(handles.execute, 'Enable', 'off'); set(handles.perform_analysis, 'Check', 'off'); %--- "Calculating" bar for i=51:100 waitbar(i/100) pause(0.75) close(h) % Delete all variables except Cumvars Cumres and measur_values clearvars -except Cumvars Cumres measur_values % OPTIONS MENU ------------------------------------------------------------ function Enable_Callback(hObject, eventdata, handles) %--- Updates the menu visibility set(handles.measurements, 'Enable', 'on'); set(handles.loads, 'Enable', 'on'); set(handles.h_displacements, 'Enable', 'on'); set(handles.enable, 'Check', 'on'); % --- Include the shear rotation in the direct analysis function Shear_Rotation_Callback(hObject, eventdata, handles) global Shearrotation Checked=get(handles.Shear_Rotation, 'Checked'); if Checked(1:2)=='of' Shearrotation=1; %--- Updates the menu visibility set(handles.shear_rotation, 'Check', 'on'); fprintf('\n Observability doesnt work with the shear rotation (Future work) \n'); Shearrotation=0; %--- Updates the menu visibility set(handles.shear_rotation, 'Check', 'off'); %--- Updates the menu visibility set(handles.perform_analysis, 'Check', 'off'); % --- Exclude horitzontal displacements (u) from the Observability function h_displacements_callback(hobject, eventdata, handles) global measur_values DisplaNames

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 7 of 26 cont=1; if ~exist('measur_values','var') isempty(measur_values) leng=length(displanames); for i=1:leng aux=char(displanames(i)); aux2=aux(1); if aux2~='dx' DisplaNames2(cont)=cellstr(aux); cont=cont+1; val=num2cell(zeros(cont-1,1)); measur_values={displanames2',cell2mat(val)}; var=(measur_values{1}); num=num2cell(cell2mat(measur_values(2))); for i=1:length(var) auxvar=char(var(i)); aux2=auxvar(1); auxval=num(i); if aux2~='dx' var2(cont)=cellstr(auxvar); num2(cont)=auxval; cont=cont+1; measur_values={var2' cell2mat(num2')}; %--- Updates the menu visibility set(handles.h_displacements, 'Check', 'on'); % --- Import the results of the direct analysis and organize the data in (dx,dy,dz,wx, wy,wz) function Measurements_Callback(hObject, eventdata, handles) global measur_values DisplaNames vardx={}; numdx=[]; vardy={}; numdy=[]; vardz={}; numdz=[]; varwx={}; numwx=[]; varwy={}; numwy=[]; varwz={}; numwz=[]; %--- Create the table measur_values whit all values iqual to zero if ~exist('measur_values','var') isempty(measur_values) leng=length(displanames); var=displanames; num=(zeros(leng,1));

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 8 of 26 cont=1; cont1=1; cont2=1; cont3=1; cont4=1; cont5=1; for i=1:length(var) auxvar=char(var(i)); aux2=auxvar(1); auxval=num(i); if aux2=='dx' vardx(cont)=cellstr(auxvar); numdx(cont)=auxval; cont=cont+1; if aux2=='dy' vardy(cont1)=cellstr(auxvar); numdy(cont1)=auxval; cont1=cont1+1; if aux2=='dz' vardz(cont2)=cellstr(auxvar); numdz(cont2)=auxval; cont2=cont2+1; if aux2=='wx' varwx(cont3)=cellstr(auxvar); numwx(cont3)=auxval; cont3=cont3+1; if aux2=='wy' varwy(cont4)=cellstr(auxvar); numwy(cont4)=auxval; cont4=cont4+1; varwz(cont5)=cellstr(auxvar); numwz(cont5)=auxval; cont5=cont5+1; var=[vardx';vardy';vardz';varwx';varwy';varwz']; num=[numdx';numdy';numdz';numwx';numwy';numwz']; value=[var,num2cell(num)]; measur_values={displanames,num}; aux=intromeasurements2(value); %--- Import values from the direct analysis var=(measur_values{1}); num=num2cell(cell2mat(measur_values(2))); cont=1; cont1=1; cont2=1; cont3=1; cont4=1; cont5=1; for i=1:length(var) auxvar=char(var(i)); aux2=auxvar(1);

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 9 of 26 auxval=cell2mat(num(i)); if aux2=='dx' vardx(cont)=cellstr(auxvar); numdx(cont)=auxval; cont=cont+1; if aux2=='dy' vardy(cont1)=cellstr(auxvar); numdy(cont1)=auxval; cont1=cont1+1; if aux2=='dz' vardz(cont2)=cellstr(auxvar); numdz(cont2)=auxval; cont2=cont2+1; if aux2=='wx' varwx(cont3)=cellstr(auxvar); numwx(cont3)=auxval; cont3=cont3+1; if aux2=='wy' varwy(cont4)=cellstr(auxvar); numwy(cont4)=auxval; cont4=cont4+1; varwz(cont5)=cellstr(auxvar); numwz(cont5)=auxval; cont5=cont5+1; var=[vardx';vardy';vardz';varwx';varwy';varwz']; num=[numdx';numdy';numdz';numwx';numwy';numwz']; value=[var,num2cell(num)]; aux=intromeasurements2(value); %--- Updates the menu visibility set(handles.measurements, 'Check', 'on'); % --- Import the loads from the ReadDATA function Loads_Callback(hObject, eventdata, handles) global loads_values nnodes ForcesNames global knownfxfyfzmxmymz valuefxfyfzmxmymz %--- Import_data the window to introduce the loads aux1=1; aux2=1; for i=1:nnodes*6 if aux1==1 loads_values{i,1}=sprintf('rx%04.0f',aux2); aux1=aux1+1; if aux1==2 loads_values{i,1}=sprintf('ry%04.0f',aux2); aux1=aux1+1; if aux1==3 loads_values{i,1}=sprintf('rz%04.0f',aux2); aux1=aux1+1; if aux1==4

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 10 of 26 loads_values{i,1}=sprintf('mx%04.0f',aux2); aux1=aux1+1; if aux1==5 loads_values{i,1}=sprintf('my%04.0f',aux2); aux1=aux1+1; loads_values{i,1}=sprintf('mz%04.0f',aux2); aux1=1; aux2=aux2+1; for i=1:6 aux=length(knownfxfyfzmxmymz{i}); if aux~=0; if i==1 var=('rx'); if i==2 var=('ry'); if i==3 var=('rz'); if i==4 var=('mx'); if i==5 var=('my'); var=('mz'); for j=1:aux auxf=knownfxfyfzmxmymz{i}(j); valf=valuefxfyfzmxmymz{i}(j); for l=1:length(loads_values) aux1=char(loads_values(l)); auxl=aux1(1:1); auxload=str2double(aux1(2:)); if auxf==auxload && var==auxl loads_values{l,2}=valf; aux=introloads2(loads_values); %--- Updates the menu visibility set(handles.loads, 'Check', 'on'); set(handles.select_measurements, 'Enable', 'on'); % --- Select the measurement set function select_measurements_callback(hobject, eventdata, handles) global measur_values t % Hint: get(hobject,'value') returns toggle state of checkbox1 var=(measur_values{1}); aux=length(var);

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 11 of 26 count=0; high=24+aux*20; if high>=644 high=644; f = figure('position',[200 200 280 high],'dockcontrols','off',... 'MenuBar','none','NumberTitle','off','Name','Measurements'); for i=1:aux num(i)={false}; count=count+1; index(i)={count}; yourdata =[transpose(index) var transpose(num)]; columnname = {'Index', 'Displacements', 'Check'}; columnformat = {'char', 'char', 'logical'}; columneditable = [false false true]; t = uitable('units','normalized','position',[0.1 0.1 0.9 0.9], 'Data', yourdata,... 'ColumnName', columnname,'columnformat', columnformat,'columneditable',... columneditable,'rowname',[],'backgroundcolor',[.7.9.8],'foregroundcolor', [0 0 0],... 'CellSelectionCallback',@(src,evnt)set(src,'UserData',evnt.Indices)); %--- Update the menu visibility set(handles.execute, 'Enable', 'on'); function Import_data_Callback(hObject, eventdata, handles) global loads_values measur_values %--- Selects the file to import_data [FileName,PathName,res_ok]=uigetfile('*.mat','Import measurements and loads'); if res_ok pathf=[pathname FileName]; try load(pathf,'loads_values','measur_values'); %--- Clear previous calculus clearportal('nivel2',handles) set(handles.import_data, 'Check', 'on'); catch warndlg('this file is not a valid project.','error in import file','modal'); function Export_data_Callback(hObject, eventdata, handles) global Example global loads_values measur_values %--- Reads the path for saving the file [FileName,PathName]=uiputfile([Example(2:-1), '_values.mat'],'export measurements and loads as'); if FileName pathf=[pathname FileName]; %save the file path

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 12 of 26 %--- Save the data if exist('loads_values','var') && exist('measur_values','var') save(pathf,'loads_values','measur_values'); if exist('loads_values','var') save(pathf,'loads_values'); if exist('measur_values','var') save(pathf,'measur_values'); warndlg('no data to export.','error in exportation','modal'); function Exit_Callback(hObject, eventdata, handles) clear all close (gcbf) function figure1_closerequestfcn(hobject, eventdata, handles) % --- Executes when user attempts to close figure1. choice = questdlg(' Are you sure?','exit MENU','YES','NO','NO'); if strcmp(choice,'yes') clear all fprintf('end OF PROGRAM\n'); diary off try delete ([pwd '\DATA.mat']), delete (gcbf) % COMMON FUNCTIONS -------------------------------------------------------- function clearportal(nivel,handles) global measur_values loads_values data1=cell(4,2); data2=cell(4,3); auxnames={'equation','','','','',''}; involvdata={'','false','false','false','false','false'}; switch nivel case 'nivel0' % change the example: clear all prevoius data clc %--- Updates the menu visibility set(handles.execute, 'Enable', 'off'); set(handles.select_measurements, 'Enable', 'off'); % set(handles.resvars_table, 'Enable', 'off'); set(handles.export_data, 'Enable', 'off'); set(handles.import_data, 'Enable', 'off'); set(handles.direct_analysis, 'Enable', 'off'); set(handles.measurements, 'Enable', 'off'); set(handles.loads, 'Enable', 'off'); set(handles.h_displacements, 'Enable', 'off'); set(handles.results_panel,'visible','off'); set(handles.squeme,'visible','off'); set(handles.select_example, 'Check', 'off'); set(handles.export_data, 'Check', 'off'); set(handles.import_data, 'Check', 'off');

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 13 of 26 set(handles.direct_analysis, 'Check', 'off'); set(handles.measurements, 'Check', 'off'); set(handles.loads, 'Check', 'off'); set(handles.enable, 'Check', 'off'); set(handles.h_displacements, 'Check', 'off'); set(handles.enable, 'Check', 'off'); set(handles.perform_analysis, 'Check', 'off'); %--- Clear tables % set(handles.resvars_table, 'Data', data1); %--- Delete some variables measur_values={}; loads_values={}; case 'nivel1' %clear the observability and the calculated results set(handles.loads, 'Check', 'off'); % set(handles.resvars_table, 'Data', data1); % case 'nivel2' %clear the calculated results % set(handles.resvars_table, 'Data', data1); % OTHER FUNCTIONS --------------------------------------------------------- function [Cumvars,Cumres]=EvalRes2(B,z,d) % Numeric Calculus global ScreenOption global error global measur_values loads_values t Measurement_set % Measured displacements and rotations in the observability try figdata=get(t,'data'); cont=0; for i=1:length(figdata(:,2)) check=figdata{i,3}; if check==1 cont=cont+1; Measured(cont,1)=figdata(i,2); Measurement_set=Measured; %--- Introduce a fix measurement set (The set selected in the GUI won't be taken into account) fprintf('\n--- In line 645 we can introduce a fix set of measurements \n\n') % Measured={'w0003';'d0005'} %--- Final solution Cumvars={}; Cumres=[];

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 14 of 26 %--- Data query validcol=find(d~=0); zpd_vector=d(validcol); Vars=[zpd_vector;Measured]; n=length(vars); NumVars=zeros(1,n); %--- Data identification if n>0 for j=1:n % search in measurements_name for k=1:length(measur_values{1}) aux=char(measur_values{1}(k)); aux=aux(1:5); if char(vars(j))==aux; NumVars(j)=measur_values{1,2}(k); % search in loads [c,ni,pos]=intersect(char(vars(j)),loads_values(:,1)); if ~isempty(c)&& ~isempty(loads_values{pos,2}) NumVars(j)=loads_values{pos,2}; %--- Calculus of the observed variables [Cumvars,Cumres]=ObtainingSingleInertia(B,z,d,Vars,NumVars,error); function [Cumvars,Cumres]=ObtainingSingleInertia(B,z,d,Vars,NumVars,error) % Solve the system B*z=d for the observable variables global v beamlength subbeamseaiziygjqizqiy M=B; [neq,ncol]=size(m); Cumvars=[]; Cumres=[]; while 1 %--- Multiply each column of M by the corresponding measurement factor=cell(1,ncol); sympl_x=z; % a)find any measurement in the complex variable and simplify the complex variables for i=1:ncol aux1=sympl_x{i}; for j=1:length(vars); aux2=char(vars(j)); commtxt=strfind(aux1,aux2); %find common text if ~isempty(commtxt) validtxt=setdiff(1:length(aux1),commtxt:commtxt+4); %valid text position aux1=aux1(validtxt); sympl_x{i}=aux1; if isempty(sympl_x{i})

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 15 of 26 sympl_x{i}=''; if isempty(factor{i}) factor{i}=aux2; factor{i}=[factor{i},'*',aux2]; %(factor,sympl_x such as x=factor*sympl_x) % b) evalue the introduced data for j=1:length(vars) eval(sprintf('syms %s;',char(vars(j)))) % c) multiply the matrix by the factors M1=M; for i=1:ncol if ~isempty(factor{i}) M1(:,i)= M(:,i)*eval(factor{i}); % d) get together the columns asociated with the equal terms x=unique(sympl_x); M2=sym(zeros(neq,length(x))); for i=1:length(x) pos=[]; %find the position of the equal terms for j=1:length(sympl_x) if strcmp(x{i},sympl_x{j}) %equal terms pos=[pos j]; M2(:,i)=sum(M1(:,pos),2); % e)if there is a completely known term, the associated column is moved to the indepent term % e.1) identify the completely known term complknown=[]; for i=1:length(x) if isempty(x{i}) complknown=[complknown, i]; keptvar=setdiff(1:length(x),complknown); one % e.2) update the matrices x=x(keptvar); indterm=zeros(neq,1); %indepent term %when there is any completly known term, this term is written as the indepent

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 16 of 26 if ~isempty(complknown) indterm=-m2(:,complknown); M2=M2(:,keptvar); %(in this point, M2*x=zpdast+indterm) %--- Results [r,c]=size(m2); IT=d+indterm; % d)nullspace and null collumns % d.1) null space NS=null(M2); if isempty(ns)==1 NS=sym(zeros(neq,1)); % d.2) null rows identvars=zeros(c,1); for i=1:c if sum(abs(ns(i,:)))==0 identvars(i)=1; unique_x=x(identvars==1); if any(identvars==1)~=0 % d.3) numerical solution for j=1:length(vars) eval(sprintf('%s=%d;',char(vars(j)),double(numvars(j)))) % evalue the introduced data L=1; %Val=eval(M2)\eval(IT); a=eval(m2); b=eval(it); Val=pinv(a, 1e-20)*b; %Calculation as a Pseudo inverse Val=Val(identVars==1); %--- Postprocess (simplify complex variables) % a) separate the simple vars from the other ones simplvar={}; complvar={}; possimplvar=[]; %positions of the simple variables poscomplvar=[]; %positions of the complex variables for i=1:length(unique_x) if length(char(unique_x{i}))==5 simplvar=[simplvar,unique_x{i}]; possimplvar=[possimplvar,i]; complvar=[complvar,unique_x{i}]; poscomplvar=[poscomplvar,i]; nsimplvar=length(simplvar);

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 17 of 26 simplval=val(possimplvar); % b) when there is any complex var, I try to simplify ind=[]; if ~isempty(complvar) for i=1:length(complvar) aux1=complvar{i}; for j=1:nsimplvar aux2=simplvar{j}; commtxt=strfind(aux1,aux2); %find common text if ~isempty(commtxt) validtxt=setdiff(1:length(aux1),commtxt:commtxt+4); %valid text position aux1=aux1(validtxt); simplvar=[simplvar,aux1]; simplval=[simplval;val(poscomplvar(i))/val(possimplvar(j))]; ind=[ind, i]; valid=setdiff(1:length(complvar),ind); complvar=complvar(valid); poscomplvar=poscomplvar(valid); % c) try to identify vars in subsystems if ~isempty(complvar) [simplvar1,simplval1]=observcouples(complvar,val(poscomplvar),error); simplvar=[simplvar,simplvar1']; simplval=[simplval,simplval1]; % d) save data to repeat the process nsimplvar=length(simplvar); if ~isempty(simplvar) for i=1:nsimplvar Vars=[Vars; sym(simplvar{i})]; NumVars=[NumVars, simplval']; Cumvars=[Cumvars, simplvar]; Cumres=[Cumres; simplval]; break; break; aux=0; aux1=0; numofiz=0; numofiy=0; numofqiz=0;

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 18 of 26 numofqiy=0; for i=1:length(cumvars) auxiz=cumvars{i}; if strcmp(auxiz(1),'iz')==1; aux=aux+1; numofiz(aux)=str2double(auxiz(2:)); auxiy=cumvars{i}; if strcmp(auxiy(1),'iy')==1; aux=aux+1; numofiy(aux)=str2double(auxiy(2:)); auxqiz=cumvars{i}; if strcmp(auxqiz(1),'qiz')==1; aux1=aux1+1; numofqiz(aux1)=str2double(auxqiz(2:)); auxqiy=cumvars{i}; if strcmp(auxqiy(1),'qiy')==1; aux1=aux1+1; numofqiy(aux1)=str2double(auxqiy(2:)); for i=1:length(subbeamseaiziygjqizqiy{3}) auxsubiz(i)=subbeamseaiziygjqizqiy{3}(i); auxsubiy(i)=subbeamseaiziygjqizqiy{4}(i); auxsubqiz(i)=subbeamseaiziygjqizqiy{7}(i); auxsubqiy(i)=subbeamseaiziygjqizqiy{8}(i); %--- If all the parameters are observed finish, apply the optimization if sort(numofiz)==sort(unique(auxsubiz)) & sort(numofqiz)==sort(unique(auxsubqiz)) %--- Error in the value of the shear area shearerror=1e-9; fprintf('\n--- Shear area error => 1e-9 \n') %--- Calculate the shear area from the QIz parameter for i=1:length(cumvars) auxqiz=cumvars{i}; if strcmp(auxqiz(1),'qiz')==1; auxnumqiz=str2double(cumvars{i}(2:)); for k=1:length(subbeamseaiziygjqizqiy{7}) if auxnumqiz==subbeamseaiziygjqizqiy{7}(k) posqiz=auxnumqiz; Cumvars{i}=strrep(auxQIz,'QIz','S'); valqiz=cumres(i); for j=1:length(cumvars) auxiz=cumvars{j}; if strcmp(auxiz(1),'iz')==1; auxnumiz=str2double(cumvars{j}(2:)); if auxnumiz==subbeamseaiziygjqizqiy{3}(posqiz) valiz=cumres(j); auxabs=abs(valqiz);

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 19 of 26 if auxabs<shearerror % if shear area is smaller than the shearerror --> Shear area = 0 Cumres(i)=0; Q=valQIz/valIz; auxl=beamlength(auxnumqiz); L=1; auxl=eval(auxl); Cumres(i)=-(24*valIz*(v+1)*(QIz-1))/(QIz*auxl^2); %--- Display the results fprintf('\n--- Numeric observed variables\n') for i=1:length(cumres) fprintf('%s = %d\n', Cumvars{i},Cumres(i)) [Cumvars,Cumres]=Optimization(M2,x,IT,Cumvars,Cumres); if sort(numofiy)==sort(unique(auxsubiy)) & sort(numofqiy)==sort(unique(auxsubqiy)) %--- Error in the value of the shear area shearerror=1e-9; fprintf('\n--- Shear area error => 1e-9 \n') %--- Calculate the shear area from the QIy parameter for i=1:length(cumvars) auxqiy=cumvars{i}; if strcmp(auxqiy(1),'qiy')==1; auxnumqiy=str2double(cumvars{i}(2:)); for k=1:length(subbeamseaiziygjqizqiy{8}) if auxnumqiy==subbeamseaiziygjqizqiy{8}(k) posqiy=auxnumqiy; Cumvars{i}=strrep(auxQIy,'QIy','S'); valqiy=cumres(i); for j=1:length(cumvars) auxiy=cumvars{j}; if strcmp(auxiy(1),'iy')==1; auxnumiy=str2double(cumvars{j}(2:)); if auxnumiy==subbeamseaiziygjqizqiy{4}(posqiy) valiy=cumres(j); auxabs=abs(valqiy); if auxabs<shearerror % if shear area is smaller than the shearerror --> Shear area = 0 Cumres(i)=0; Q=valQIy/valIy; auxl=beamlength(auxnumqiy);

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 20 of 26 L=1; auxl=eval(auxl); Cumres(i)=-(24*valIy*(v+1)*(QIy-1))/(QIy*auxl^2); %--- Display the results fprintf('\n--- Numeric observed variables\n') for i=1:length(cumres) fprintf('%s = %d\n', Cumvars{i},Cumres(i)) [Cumvars,Cumres]=Optimization(M2,x,IT,Cumvars,Cumres); function [SingleVars,SingleVal]=ObservCouples(var,val,error) % log(var)=abs(val) SingleVars={}; SingleVal=[]; %delete zeros indzeros=find(abs(val)<error); for i=indzeros' if length(var{i})<6 SingleVars=[SingleVars;var{i} ]; SingleVal=[SingleVal; 0]; valid=setdiff(1:length(val),indzeros); var=var(valid); val=val(valid); % logabsval=log(abs(val)); r=length(val); %identifyes the single variables singles=cell(1,2*r); sings=ones(1,2*r); delet=[]; for i=1:r singles{i}=var{i}(1:5); if ~any([strcmp(singles{i}(1),'a'),strcmp(singles{i}(1),'iz'),strcmp(singles{i} (1),'Iy'),strcmp(singles{i}(1),'J')]) sings(i)=sign(val(i)); if length(var{i})>5 singles{i+r}=var{i}(6:); if ~any([strcmp(singles{i+r}(1),'a'),strcmp(singles{i+r}(1),'iz'),strcmp (singles{i}(1),'iy'),strcmp(singles{i}(1),'j')]) sings(i+r)=sign(val(i));

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 21 of 26 delet=[delet,i+r]; singles=singles(setdiff(1:2*r,delet)); [singles,ind,ni]=unique(singles); sings=sings(ind); %build the 0/1 matrix log(var) c=length(singles); A=zeros(r,c); for i=1:r for j=1:c if findstr(var{i},singles{j}) A(i,j)=1; %solve the system % 1) null space NS=null(A,'r'); NS(abs(NS)<error)=0; % 2) null rows identvars=zeros(c,1); for i=1:c if sum(abs(ns(i,:)))==0 identvars(i)=1; unique_s=singles(identvars==1); sings=sings(identvars==1); if any(identvars==1)~=0 % 3) numerical solution Val=exp(A(:,identVars==1)\logabsval); % 4) recover sign Val=Val.*sings'; % Save results SingleVars=[SingleVars;unique_s' ]; SingleVal=[SingleVal; Val]; % --- Optimization function [Cumvars,Cumres]=Optimization(M2,x,IT,Cumvars,Cumres) syms Variables Normalized Recover Error_in_percent syms Exact Solved global v beamlength global subbeamseaiziygjqizqiy knowneaiziygjsdirect valueeaiziygjsdirect nbeams global measur_values loads_values

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 22 of 26 L=1; M2=subs(M2,'L',1); IT=subs(IT,'L',1); %--- Search in the results of the observability for j=1:length(cumvars) IT=subs(IT,Cumvars(j),Cumres(j)); M2=subs(M2,Cumvars(j),Cumres(j)); %--- Search in the loads applied for j=1:length(loads_values) new=loads_values{j,2}; if ~isempty (new) old=loads_values{j,1}; IT=subs(IT,old,new); %--- Search in the measurements from the Direct Analysis var_exact=sym(x); for i=1:length(measur_values{1}) old=measur_values{1}(i); new=measur_values{2}(i); M2=subs(M2,old,new); IT=subs(IT,old,new); var_exact=subs(var_exact,old,new); for k=1:length(x) auxx=char(x(k)); if length(auxx)>=6 if (auxx(6:))==char(old) auxd=subs(auxx(6:),old,new); var_exact(k)=sym(auxx(1:5))*auxd; %--- Put the unused forces as 0 ind=1; for beam=1:nbeams+1 namerx=['rx' sprintf('%04.0f',ind)]; namery=['ry' sprintf('%04.0f',ind)]; namerz=['rz' sprintf('%04.0f',ind)]; namemx=['mx' sprintf('%04.0f',ind)]; namemy=['my' sprintf('%04.0f',ind)]; namemz=['mz' sprintf('%04.0f',ind)]; ind=ind+1; IT=subs(IT,nameRx,0); IT=subs(IT,nameRy,0); IT=subs(IT,nameRz,0); IT=subs(IT,nameMx,0); IT=subs(IT,nameMy,0); IT=subs(IT,nameMz,0);

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 23 of 26 %--- Search in the ReadData for the values of E,A,Iz,Iy,G,J & Q j=1; ind=1; ind1=1; ind2=1; ind3=1; ind4=1; ind5=1; ind6=0; ind7=0; for k=1:4 for j=1:length(knowneaiziygjsdirect{k}) pos=(knowneaiziygjsdirect{k}(j)); if pos>0 switch k case 1 namee=['e' sprintf('%04.0f',ind)]; auxe(ind)=[valueeaiziygjsdirect{k}(pos)]; var_exact=subs(var_exact,namee,auxe(ind)); ind=ind+1; case 2 namea=['a' sprintf('%04.0f',ind1)]; auxa(ind1)=[valueeaiziygjsdirect{k}(pos)]; var_exact=subs(var_exact,namea,auxa(ind1)); ind1=ind1+1; case 3 nameiz=['iz' sprintf('%04.0f',ind2)]; auxiz(ind2)=[valueeaiziygjsdirect{k}(pos)]; var_exact=subs(var_exact,nameiz,auxiz(ind2)); ind2=ind2+1; case 4 nameiy=['iy' sprintf('%04.0f',ind3)]; auxiy(ind3)=[valueeaiziygjsdirect{k}(pos)]; var_exact=subs(var_exact,nameiy,auxiy(ind3)); ind3=ind3+1; case 5 nameg=['g' sprintf('%04.0f',ind4)]; auxg(ind4)=[valueeaiziygjsdirect{k}(pos)]; var_exact=subs(var_exact,nameg,auxg(ind4)); ind4=ind4+1; case 6 namej=['j' sprintf('%04.0f',ind5)]; auxj(ind5)=[valueeaiziygjsdirect{k}(pos)]; var_exact=subs(var_exact,namej,auxj(ind5)); ind5=ind5+1; case 7 ind6=ind6+1; nameqiz=['qiz' sprintf('%04.0f',ind6)]; auxqiz(ind3)=[valueeaiziygjsdirect{k}(pos)]; posqiz=subbeamseaiziygjqizqiy{7}(ind6); auxqizval=(24*auxiz(subbeamseaiziygjqizqiy{3}(posqiz))^2*(v + 1))/ (auxqiz(ind7)*(eval(beamlength(ind7)))^2 + 24*auxIz(subbeamsEAIzIyGJQIzQIy{3}(posQIz)) *(v + 1));

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 24 of 26 var_exact=subs(var_exact,nameq,auxqval); case 8 ind7=ind7+1; nameqiy=['qiy' sprintf('%04.0f',ind7)]; auxqiy(ind4)=[valueeaiziygjsdirect{k}(pos)]; posqiy=subbeamseaiziygjqizqiy{8}(ind7); auxqiyval=(24*auxiy(subbeamseaiziygjqizqiy{4}(posqiy))^2*(v + 1))/ (auxqiy(ind8)*(eval(beamlength(ind8)))^2 + 24*auxIy(subbeamsEAIzIyGJQIzQIy{4}(posQIy)) *(v + 1)); var_exact=subs(var_exact,nameq,auxqval); IT=eval(IT); var_exact=eval(var_exact); %--- Normalization of the matrix B B=eval(M2); nvar=length(var_exact); for i=1:nvar B(:,i)=B(:,i)*var_exact(i); %--- Optimization algorithm [x_opt,xsymb,nepsilon,fval,z_sorted]=minimleastsq_jun(b, x, IT); %% solve %--- Plot the optimization results n=length(xsymb)-size(m2,1); fprintf('--- Optimization results\n'); fprintf('%s\n',['variables Error_in_percent(%)' ]); Normalized for i=size(m2,1)+1:size(m2,1)+n fprintf('%8s%24.8f%s%24.1f\n',[char(xsymb{i}) ' ' ],x_opt(i), ' ',(x_opt (i)-1)*100); %--- Multiply the optimization results for the value of the variable used ind=0; for i=1:length(x) auxx=char(x(i)); if length(auxx)==5 for j=1:length(xsymb) auxxs=xsymb(j); if (~cellfun(@isempty,auxxs))==1 auxxs=char(auxxs); if length(auxxs)==5 if auxx==auxxs ind=ind+1; varop{ind}=auxx; valop{ind}=x_opt(j)*var_exact(i);

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 25 of 26 %--- Add the results of the optimization to the observability results aux=0; leng=length(cumvars); for i=1:length(varop) aux=aux+1; Cumvars(leng+aux)=varop(i); Cumres(leng+aux)=valop{i}; %--- Error in the value of the shear area shearerror=1e-9; fprintf('\n--- Shear area error => 1e-9 \n') %--- Calculate the shear area from the Q parameter for i=1:length(cumvars) auxqiz=cumvars{i}; if strcmp(auxqiz(1),'qiz')==1; auxnumqiz=str2double(cumvars{i}(2:)); for k=1:length(subbeamseaiziygjqizqiy{7}) if auxnumqiz==subbeamseaiziygjqizqiy{7}(k) posqiz=auxnumqiz; Cumvars{i}=strrep(auxQIz,'QIz','S'); valqiz=cumres(i); for j=1:length(cumvars) auxiz=cumvars{j}; if strcmp(auxiz(1),'iz')==1; auxnumiz=str2double(cumvars{j}(2:)); if auxnumiz==subbeamseaiziygjqizqiy{3}(posqiz) valiz=cumres(j); auxabs=abs(valqiz); if auxabs<shearerror % if shear area is smaller than the shearerror --> Shear area = 0 Cumres(i)=0; Q=valQIz/valIz; auxl=beamlength(auxnumqiz); L=1; auxl=eval(auxl); Cumres(i)=-(24*valIz*(v+1)*(QIz-1))/(QIz*auxl^2); auxqiy=cumvars{i}; if strcmp(auxqiy(1),'qiy')==1; auxnumqiy=str2double(cumvars{i}(2:)); for k=1:length(subbeamseaiziygjqizqiy{8})

5/09/17 16:50 C:\Users\caminstech\Desktop...\Portal2.m 26 of 26 if auxnumqiy==subbeamseaiziygjqizqiy{8}(k) posqiy=auxnumqiy; Cumvars{i}=strrep(auxQIz,'QIy','S'); valqiy=cumres(i); for j=1:length(cumvars) auxiy=cumvars{j}; if strcmp(auxiy(1),'iy')==1; auxnumiy=str2double(cumvars{j}(2:)); if auxnumiy==subbeamseaiziygjqizqiy{4}(posqiz) valiy=cumres(j); auxabs=abs(valqiy); if auxabs<shearerror % if shear area is smaller than the shearerror --> Shear area = 0 Cumres(i)=0; Q=valQIy/valIy; auxl=beamlength(auxnumqiy); L=1; auxl=eval(auxl); Cumres(i)=-(24*valIy*(v+1)*(QIy-1))/(QIy*auxl^2); %--- Display the results fprintf('\n--- Numeric observed variables\n') for i=1:length(cumres) fprintf('%s = %d\n', Cumvars{i},Cumres(i)) fprintf('\n')

5/09/17 16:44 C:\Users\caminstech\Desk...\AAReadDATA22.m 1 of 2 function AAReadDATA22(Example) global beams nodecoordinates global knowndxdydzwxwywz knownfxfyfzmxmymz knowneaiziygjqizqiy knowneaeizeiygjeqizeqiy knowneaiziygjsdirect global valuedxdydzwxwywz valuefxfyfzmxmymz valueeaiziygjqizqiy valueeaeizeiygjeqizeqiy valueeaiziygjsdirect global subbeamseaiziygjqizqiy %--- --- --- --- (De momento las E's son conocidas) --- --- --- --- --- --- % OPTIONS: % Viga biapoyada 3 tramos % IMPORTANT: Script without anotations. Follow AA_READATA2 for exted comments. %--- --- --- --- --- --- --- --- ---(CASES)--- --- --- --- --- --- --- --- syms L positive; switch Example case 'Viga biapoyada 3 tramos' %--- GEOMETRY nodecoordinates=l*[ 0 0 0 1 0 0 2 0 0 3 0 0]; beams=[ 1 2 2 3 3 4]; %--- FORCES, DISPLACEMENTS AND MECHANICAL PROPERTIES % Displacements knowndxdydzwxwywz={[1]; [1 4]; []; []; []; []}; % [dx] [dy] [dz] [wx] [wy] [wz] valuedxdydzwxwywz={[0]; [0 0]; []; []; []; []}; % Only boundary conditions for each node. % Forces knownfxfyfzmxmymz={[]; [2]; []; []; []; []}; % [Fx] [Fy] [Fz] [Mx] [My] [Mz] valuefxfyfzmxmymz={[]; [-100]; []; []; []; []}; % Only external forces applied for each node. % Mechanical Properties knowneaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] valueeaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % Known parameters. % Introduce the real values of the E, A, Iz, Iy, G, J & S parameters % to calculate the stiffness method solution (DIRECT SOLUTION), % write [1] if the value is known. knowneaiziygjsdirect={[1]; [1 2 3]; [1 2 3]; [1 2 3]; []; []; [1]}; % [E] [A] [Iz] [Iy] [G] [J] [S] (S => Shear Area) valueeaiziygjsdirect={[30000000]; [1 1 1]; [2.083333333333 2.083333333333 2.083333333333]; [2.083333333333 2.083333333333 2.083333333333]; []; []; [0.83333333]}; % Real values. % Indicate the list of beams knowneaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % [EA] [EIz] [EIy] [GJ] [EQIz] [EQIy]

5/09/17 16:44 C:\Users\caminstech\Desk...\AAReadDATA22.m 2 of 2 valueeaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % Real values. % Diferents types of beams subbeamseaiziygjqizqiy={[]; []; []; []; []; []; []; [];}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy]

5/09/17 16:44 C:\Users\caminstech\De...\AA_ReadDATA2.m 1 of 10 function ReadDATA_Example2(Example) global beams nodecoordinates global knowndxdydzwxwywz knownfxfyfzmxmymz knowneaiziygjqizqiy knowneaeizeiygjeqizeqiy knowneaiziygjsdirect global valuedxdydzwxwywz valuefxfyfzmxmymz valueeaiziygjqizqiy valueeaeizeiygjeqizeqiy valueeaiziygjsdirect global subbeamseaiziygjqizqiy %--- --- --- --- --- --- --- --- ---(CASES)--- --- --- --- --- --- --- --- % This data is used for both the [DIRECT] and the [INVERSE] analysis: % Information for [DIRECT] Analysis: % Knownfxfyfzmxmymz and Valuefxfyfzmxmymz: These vectors include the values of the actual known external forces. % KnownEAIzIyGJSdirect and ValueEAIzIyGJSdirect: These vectors include the values of the actual known geometry. % If the Direct Analysis does not include shear deformations include S=0. % Information for [INVERSE] Analysis: % KnownEAIzIyGJQIzQIy, ValueEAIzIyGJQIzQIy, KnownEAEIzEIyGJEQIzEQIy and ValueEAEIzEIyGJEQIzEQIy: These vectors include the known information in the observability. % If the Inverse Analysis does not include shear deformations include QI=0. syms L positive; switch Example case 'Viga puente Arriaca (Guadalajara)' nodecoordinates=l*[ 0 0 0 12 0 0 36 0 0 60 0 0 84 0 0 100 0 0 116 0 0 140 0 0 164 0 0 188 0 0 200 0 0 100 0-16 100 0 17.5 100 0 30 100 0 42.5 100 0 55]; beams=[ 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12

5/09/17 16:44 C:\Users\caminstech\De...\AA_ReadDATA2.m 2 of 10 12 13 13 14 14 15 15 16 2 16 3 15 4 14 5 13 7 13 8 14 9 15 10 16]; %--- FORCES, DISPLACEMENTS AND MECHANICAL PROPERTIES % Displacements knowndxdydzwxwywz={[1 6 11 12]; [1 6 11 12]; [1 6 11 12]; [11 12]; [11 12]; [11 12]}; % [dx] [dy] [dz] [wx] [wy] [wz] introduce [] the number of node. valuedxdydzwxwywz={[0 0 0 0]; [0 0 0 0]; [0 0 0 0]; [0 0]; [0 0]; [0 0]}; % Only boundary conditions for each node. % Forces knownfxfyfzmxmymz={[]; []; [1 2 3 4 5 7 8 9 10 11]; []; []; [1 2 3 4 5 7 8 9 10 11]}; % [fx] [fy] [fz] [mx] [my] [mz] introduce [] the number of node. valuefxfyfzmxmymz={[]; []; [1230 3690 4920 4920 4100 4100 4920 4920 3690 1230]; []; []; [2460 12300 19680 19680 14213 14213 19680 19680 12300 2460 ]}; % Only external forces applied for each node. % Mechanical Properties knowneaiziygjqizqiy={[1]; []; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] if the value is known % valueeaiziygjqizqiy={[21000000]; []; []; []; []; []; []; []}; % Known parameters. % Introduce the real values of the E, A, Iz, Iy, G, J & S parameters % to calculate the stiffness method solution (DIRECT SOLUTION), % write [1] if the value is known. knowneaiziygjsdirect={[1]; [1]; [1]; [1]; []; []; [1]}; % [E] [A] [Iz] [Iy] [G] [J] [S] (S => Shear Area) valueeaiziygjsdirect={[30000000]; [1]; [1.9]; [5.0]; []; []; [2.10]}; % Real values. % Indicate the list of beams knowneaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % [EA] [EIz] [EIy] [GJ] [EQIz] [EQIy] valueeaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % Real values. % Diferents types of beams subbeamseaiziygjqizqiy={[1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1]; [1 1 1 1 1 1 1 1 1 1 1 1 1 1 ]; [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1]; [1 1 1 1 1 1 1 1 ]; [1 1]; [1 1]; [1 1]; [1 1]}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] for each beam. In this case as there are 2 beams: [1] [1] one for each beam. case 'Viga biapoyada 3 nodos 10m' nodecoordinates=l*[ 0 0 0 2.5 0 0 5 0 0 7.5 0 0 10 0 0]; beams=[ 1 2 2 3

5/09/17 16:44 C:\Users\caminstech\De...\AA_ReadDATA2.m 3 of 10 3 4 4 5]; %--- FORCES, DISPLACEMENTS AND MECHANICAL PROPERTIES % Displacements knowndxdydzwxwywz={[]; []; []; []; []; []}; % [dx] [dy] [dz] [wx] [wy] [wz] introduce [] the number of node valuedxdydzwxwywz={[]; []; []; []; []; []}; % Only boundary conditions for each node. % Forces knownfxfyfzmxmymz={[]; []; []; []; []; []}; % [Fx] [Fy] [Fz] [Mx] [My] [Mz] introduce [] the number of node valuefxfyfzmxmymz={[]; []; []; []; []; []}; % Only external forces applied for each node. % Mechanical Properties knowneaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] if the value is known % valueeaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % Known parameters. % Introduce the real values of the E, A, Iz, Iy, G, J & S parameters % to calculate the stiffness method solution (DIRECT SOLUTION), % write [1] if the value is known. knowneaiziygjsdirect={[]; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G] [J] [S] (S => Shear Area) valueeaiziygjsdirect={[]; []; []; []; []; []; []}; % Real values. % Indicate the list of beams knowneaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % [EA] [EIz] [EIy] [GJ] [EQIz] [EQIy] valueeaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % Real values. % Diferents types of beams subbeamseaiziygjqizqiy={[]; []; []; []; []; []; []; [];}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] for each beam. In this case as there are 2 beams: [1] [1] one for each beam. case 'Viga biapoyada 2 nodos intermedios' nodecoordinates=l*[ 0 0 0 4 0 0 8 0 0 12 0 0]; beams=[ 1 2 2 3 3 4]; %--- FORCES, DISPLACEMENTS AND MECHANICAL PROPERTIES % Displacements knowndxdydzwxwywz={[]; []; []; []; []; []}; % [dx] [dy] [dz] [wx] [wy] [wz] introduce [] the number of node valuedxdydzwxwywz={[]; []; []; []; []; []}; % Only boundary conditions for each node. % Forces knownfxfyfzmxmymz={[]; []; []; []; []; []}; % [Fx] [Fy] [Fz] [Mx] [My] [Mz] introduce [] the number of node valuefxfyfzmxmymz={[]; []; []; []; []; []}; % Only external forces applied for each node. % Mechanical Properties knowneaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] if the value is known % valueeaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % Known parameters. % Introduce the real values of the E, A, Iz, Iy, G, J & S parameters

5/09/17 16:44 C:\Users\caminstech\De...\AA_ReadDATA2.m 4 of 10 % to calculate the stiffness method solution (DIRECT SOLUTION), % write [1] if the value is known. knowneaiziygjsdirect={[]; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G] [J] [S] (S => Shear Area) valueeaiziygjsdirect={[]; []; []; []; []; []; []}; % Real values. % Indicate the list of beams knowneaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % [EA] [EIz] [EIy] [GJ] [EQIz] [EQIy] valueeaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % Real values. % Diferents types of beams subbeamseaiziygjqizqiy={[]; []; []; []; []; []; []; [];}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] for each beam. In this case as there are 2 beams: [1] [1] one for each beam. case 'Viga continua 2 vanos' nodecoordinates=l*[ 0 0 0 6 0 0 12 0 0 16 0 0 20 0 0 24 0 0]; beams=[ 1 2 2 3 3 4 4 5 5 6]; %--- FORCES, DISPLACEMENTS AND MECHANICAL PROPERTIES % Displacements knowndxdydzwxwywz={[]; []; []; []; []; []}; % [dx] [dy] [dz] [wx] [wy] [wz] introduce [] the number of node valuedxdydzwxwywz={[]; []; []; []; []; []}; % Only boundary conditions for each node. % Forces knownfxfyfzmxmymz={[]; []; []; []; []; []}; % [Fx] [Fy] [Fz] [Mx] [My] [Mz] introduce [] the number of node valuefxfyfzmxmymz={[]; []; []; []; []; []}; % Only external forces applied for each node. % Mechanical Properties knowneaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] if the value is known % valueeaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % Known parameters. % Introduce the real values of the E, A, Iz, Iy, G, J & S parameters % to calculate the stiffness method solution (DIRECT SOLUTION), % write [1] if the value is known. knowneaiziygjsdirect={[]; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G] [J] [S] (S => Shear Area) valueeaiziygjsdirect={[]; []; []; []; []; []; []}; % Real values. % Indicate the list of beams knowneaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % [EA] [EIz] [EIy] [GJ] [EQIz] [EQIy] valueeaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % Real values. % Diferents types of beams subbeamseaiziygjqizqiy={[]; []; []; []; []; []; []; [];}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] for each beam. In this case as there are 2 beams: [1] [1] one for each beam. case 'Portico prueba Josep'

5/09/17 16:44 C:\Users\caminstech\De...\AA_ReadDATA2.m 5 of 10 nodecoordinates=l*[ 0 0 0 0 3 0 6 3 0 6 0 0]; beams=[ 1 2 2 3 3 4 2 4]; %--- FORCES, DISPLACEMENTS AND MECHANICAL PROPERTIES % Displacements knowndxdydzwxwywz={[]; []; []; []; []; []}; % [dx] [dy] [dz] [wx] [wy] [wz] introduce [] the number of node valuedxdydzwxwywz={[]; []; []; []; []; []}; % Only boundary conditions for each node. % Forces knownfxfyfzmxmymz={[]; []; []; []; []; []}; % [Fx] [Fy] [Fz] [Mx] [My] [Mz] introduce [] the number of node valuefxfyfzmxmymz={[]; []; []; []; []; []}; % Only external forces applied for each node. % Mechanical Properties knowneaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] if the value is known % valueeaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % Known parameters. % Introduce the real values of the E, A, Iz, Iy, G, J & S parameters % to calculate the stiffness method solution (DIRECT SOLUTION), % write [1] if the value is known. knowneaiziygjsdirect={[]; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G] [J] [S] (S => Shear Area) valueeaiziygjsdirect={[]; []; []; []; []; []; []}; % Real values. % Indicate the list of beams knowneaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % [EA] [EIz] [EIy] [GJ] [EQIz] [EQIy] valueeaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % Real values. % Diferents types of beams subbeamseaiziygjqizqiy={[]; []; []; []; []; []; []; [];}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] for each beam. In this case as there are 2 beams: [1] [1] one for each beam. case 'Portico prueba 5 nodos' nodecoordinates=l*[ 0 0 0 0 3 0 3 3 0 6 3 0 6 0 0]; beams=[ 1 2 2 3 3 4 4 2]; %--- FORCES, DISPLACEMENTS AND MECHANICAL PROPERTIES % Displacements knowndxdydzwxwywz={[]; []; []; []; []; []}; % [dx] [dy] [dz] [wx] [wy] [wz] introduce [] the number of node valuedxdydzwxwywz={[]; []; []; []; []; []}; % Only boundary conditions for each node. % Forces knownfxfyfzmxmymz={[]; []; []; []; []; []}; % [Fx] [Fy] [Fz] [Mx] [My]

5/09/17 16:44 C:\Users\caminstech\De...\AA_ReadDATA2.m 6 of 10 [Mz] introduce [] the number of node valuefxfyfzmxmymz={[]; []; []; []; []; []}; % Only external forces applied for each node. % Mechanical Properties knowneaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] if the value is known % valueeaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % Known parameters. % Introduce the real values of the E, A, Iz, Iy, G, J & S parameters % to calculate the stiffness method solution (DIRECT SOLUTION), % write [1] if the value is known. knowneaiziygjsdirect={[]; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G] [J] [S] (S => Shear Area) valueeaiziygjsdirect={[]; []; []; []; []; []; []}; % Real values. % Indicate the list of beams knowneaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % [EA] [EIz] [EIy] [GJ] [EQIz] [EQIy] valueeaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % Real values. % Diferents types of beams subbeamseaiziygjqizqiy={[]; []; []; []; []; []; []; [];}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] for each beam. In this case as there are 2 beams: [1] [1] one for each beam. case 'Columna' nodecoordinates=l*[ 0 0 0 0 3 0]; beams=[ 1 2]; %--- FORCES, DISPLACEMENTS AND MECHANICAL PROPERTIES % Displacements knowndxdydzwxwywz={[]; []; []; []; []; []}; % [dx] [dy] [dz] [wx] [wy] [wz] introduce [] the number of node valuedxdydzwxwywz={[]; []; []; []; []; []}; % Only boundary conditions for each node. % Forces knownfxfyfzmxmymz={[]; []; []; []; []; []}; % [Fx] [Fy] [Fz] [Mx] [My] [Mz] introduce [] the number of node valuefxfyfzmxmymz={[]; []; []; []; []; []}; % Only external forces applied for each node. % Mechanical Properties knowneaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] if the value is known % valueeaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % Known parameters. % Introduce the real values of the E, A, Iz, Iy, G, J & S parameters % to calculate the stiffness method solution (DIRECT SOLUTION), % write [1] if the value is known. knowneaiziygjsdirect={[]; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G] [J] [S] (S => Shear Area) valueeaiziygjsdirect={[]; []; []; []; []; []; []}; % Real values. % Indicate the list of beams knowneaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % [EA] [EIz] [EIy] [GJ] [EQIz] [EQIy] valueeaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % Real values. % Diferents types of beams subbeamseaiziygjqizqiy={[]; []; []; []; []; []; []; [];}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] for each beam. In this case as there are 2 beams: [1] [1] one for each beam. case 'Viga'

5/09/17 16:44 C:\Users\caminstech\De...\AA_ReadDATA2.m 7 of 10 nodecoordinates=l*[ 0 0 0 3 0 0]; beams=[ 1 2]; %--- FORCES, DISPLACEMENTS AND MECHANICAL PROPERTIES % Displacements knowndxdydzwxwywz={[]; []; []; []; []; []}; % [dx] [dy] [dz] [wx] [wy] [wz] introduce [] the number of node valuedxdydzwxwywz={[]; []; []; []; []; []}; % Only boundary conditions for each node. % Forces knownfxfyfzmxmymz={[]; []; []; []; []; []}; % [Fx] [Fy] [Fz] [Mx] [My] [Mz] introduce [] the number of node valuefxfyfzmxmymz={[]; []; []; []; []; []}; % Only external forces applied for each node. % Mechanical Properties knowneaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] if the value is known % valueeaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % Known parameters. % Introduce the real values of the E, A, Iz, Iy, G, J & S parameters % to calculate the stiffness method solution (DIRECT SOLUTION), % write [1] if the value is known. knowneaiziygjsdirect={[]; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G] [J] [S] (S => Shear Area) valueeaiziygjsdirect={[]; []; []; []; []; []; []}; % Real values. % Indicate the list of beams knowneaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % [EA] [EIz] [EIy] [GJ] [EQIz] [EQIy] valueeaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % Real values. % Diferents types of beams subbeamseaiziygjqizqiy={[]; []; []; []; []; []; []; [];}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] for each beam. In this case as there are 2 beams: [1] [1] one for each beam. case 'Viga inclinada negativa' nodecoordinates=l*[ 0 0 0-3 -3 0]; beams=[ 1 2]; %--- FORCES, DISPLACEMENTS AND MECHANICAL PROPERTIES % Displacements knowndxdydzwxwywz={[]; []; []; []; []; []}; % [dx] [dy] [dz] [wx] [wy] [wz] introduce [] the number of node valuedxdydzwxwywz={[]; []; []; []; []; []}; % Only boundary conditions for each node. % Forces knownfxfyfzmxmymz={[]; []; []; []; []; []}; % [Fx] [Fy] [Fz] [Mx] [My] [Mz] introduce [] the number of node valuefxfyfzmxmymz={[]; []; []; []; []; []}; % Only external forces applied for each node. % Mechanical Properties knowneaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] if the value is known % valueeaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % Known parameters. % Introduce the real values of the E, A, Iz, Iy, G, J & S parameters % to calculate the stiffness method solution (DIRECT SOLUTION), % write [1] if the value is known. knowneaiziygjsdirect={[]; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G]

5/09/17 16:44 C:\Users\caminstech\De...\AA_ReadDATA2.m 8 of 10 [J] [S] (S => Shear Area) valueeaiziygjsdirect={[]; []; []; []; []; []; []}; % Real values. % Indicate the list of beams knowneaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % [EA] [EIz] [EIy] [GJ] [EQIz] [EQIy] valueeaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % Real values. % Diferents types of beams subbeamseaiziygjqizqiy={[]; []; []; []; []; []; []; [];}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] for each beam. In this case as there are 2 beams: [1] [1] one for each beam. case 'Viga inclinada' nodecoordinates=l*[ 0 0 0 3 3 0]; beams=[ 1 2]; %--- FORCES, DISPLACEMENTS AND MECHANICAL PROPERTIES % Displacements knowndxdydzwxwywz={[]; []; []; []; []; []}; % [dx] [dy] [dz] [wx] [wy] [wz] introduce [] the number of node valuedxdydzwxwywz={[]; []; []; []; []; []}; % Only boundary conditions for each node. % Forces knownfxfyfzmxmymz={[]; []; []; []; []; []}; % [Fx] [Fy] [Fz] [Mx] [My] [Mz] introduce [] the number of node valuefxfyfzmxmymz={[]; []; []; []; []; []}; % Only external forces applied for each node. % Mechanical Properties knowneaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] if the value is known % valueeaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % Known parameters. % Introduce the real values of the E, A, Iz, Iy, G, J & S parameters % to calculate the stiffness method solution (DIRECT SOLUTION), % write [1] if the value is known. knowneaiziygjsdirect={[]; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G] [J] [S] (S => Shear Area) valueeaiziygjsdirect={[]; []; []; []; []; []; []}; % Real values. % Indicate the list of beams knowneaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % [EA] [EIz] [EIy] [GJ] [EQIz] [EQIy] valueeaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % Real values. % Diferents types of beams subbeamseaiziygjqizqiy={[]; []; []; []; []; []; []; [];}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] for each beam. In this case as there are 2 beams: [1] [1] one for each beam. case 'Viga inclinada negativa inversa' nodecoordinates=l*[ 0 0 0 3-3 0]; beams=[ 1 2]; %--- FORCES, DISPLACEMENTS AND MECHANICAL PROPERTIES % Displacements knowndxdydzwxwywz={[]; []; []; []; []; []}; % [dx] [dy] [dz] [wx] [wy] [wz] introduce [] the number of node valuedxdydzwxwywz={[]; []; []; []; []; []}; % Only boundary conditions for each node. % Forces knownfxfyfzmxmymz={[]; []; []; []; []; []}; % [Fx] [Fy] [Fz] [Mx] [My]

5/09/17 16:44 C:\Users\caminstech\De...\AA_ReadDATA2.m 9 of 10 [Mz] introduce [] the number of node valuefxfyfzmxmymz={[]; []; []; []; []; []}; % Only external forces applied for each node. % Mechanical Properties knowneaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] if the value is known % valueeaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % Known parameters. % Introduce the real values of the E, A, Iz, Iy, G, J & S parameters % to calculate the stiffness method solution (DIRECT SOLUTION), % write [1] if the value is known. knowneaiziygjsdirect={[]; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G] [J] [S] (S => Shear Area) valueeaiziygjsdirect={[]; []; []; []; []; []; []}; % Real values. % Indicate the list of beams knowneaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % [EA] [EIz] [EIy] [GJ] [EQIz] [EQIy] valueeaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % Real values. % Diferents types of beams subbeamseaiziygjqizqiy={[]; []; []; []; []; []; []; [];}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] for each beam. In this case as there are 2 beams: [1] [1] one for each beam. case 'Viga empotrada 4 cargas' nodecoordinates=l*[ 0 0 0 0.75 0 0 1.5 0 0 2.25 0 0 3 0 0]; beams=[ 1 2 2 3 3 4 4 5]; %--- FORCES, DISPLACEMENTS AND MECHANICAL PROPERTIES % Displacements knowndxdydzwxwywz={[]; []; []; []; []; []}; % [dx] [dy] [dz] [wx] [wy] [wz] introduce [] the number of node valuedxdydzwxwywz={[]; []; []; []; []; []}; % Only boundary conditions for each node. % Forces knownfxfyfzmxmymz={[]; []; []; []; []; []}; % [Fx] [Fy] [Fz] [Mx] [My] [Mz] introduce [] the number of node valuefxfyfzmxmymz={[]; []; []; []; []; []}; % Only external forces applied for each node. % Mechanical Properties knowneaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] if the value is known % valueeaiziygjqizqiy={[]; []; []; []; []; []; []; []}; % Known parameters. % Introduce the real values of the E, A, Iz, Iy, G, J & S parameters % to calculate the stiffness method solution (DIRECT SOLUTION), % write [1] if the value is known. knowneaiziygjsdirect={[]; []; []; []; []; []; []}; % [E] [A] [Iz] [Iy] [G] [J] [S] (S => Shear Area) valueeaiziygjsdirect={[]; []; []; []; []; []; []}; % Real values. % Indicate the list of beams knowneaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % [EA] [EIz] [EIy] [GJ] [EQIz] [EQIy]

5/09/17 16:44 C:\Users\caminstech\De...\AA_ReadDATA2.m 10 of 10 valueeaeizeiygjeqizeqiy={[]; []; []; []; []; [];}; % Real values. % Diferents types of beams subbeamseaiziygjqizqiy={[]; []; []; []; []; []; []; [];}; % [E] [A] [Iz] [Iy] [G] [J] [QIz] [QIy] write [1] for each beam. In this case as there are 2 beams: [1] [1] one for each beam.

5/09/17 16:45 C:\Users\caminstech\Des...\BoundaryCond2.m 1 of 4 function [GSM,GSMVarsNames,KnownForces,KnownForcesValues,Alldisplacements] =BoundaryCond2(GSM0,GSMVarsNames,ForcesNames,KnownName,valuevars) global ScreenOption Symbway %--- VECTOR OF FORCES %--- a) Identify the known forces KnownForces=zeros(length(ForcesNames),1); KnownForcesValues=sym(zeros(length(ForcesNames),1)); KnownForcesname=cell(length(ForcesNames),1); typeknown=zeros(size(knownname)); for i=1:length(forcesnames) for j=1:length(knownname) if isequal(forcesnames{i},knownname{j}) KnownForces(i)=i; KnownForcesValues(i)=valuevars(j); KnownForcesname(i)=KnownName(j); typeknown(j)=1; break %--- E or G variable: delete from the list when it is known lengthgsmvars=length(gsmvarsnames); factor=ones(1,lengthgsmvars); for i=1:length(knownname) aux=knownname{i}; if strcmp('e',aux(1)) strcmp('g',aux(1)) typeknown(i)=2; EGvar=KnownName{i}; for j=1:lengthgsmvars auxvar=gsmvarsnames{j}; pos=strfind(auxvar,egvar); if ~isempty(pos) GSMVarsNames{j}=auxvar(setdiff(1:29,pos:pos+4)); factor(j)=factor(j)*valuevars(i); %--- A, Iz, Iy or J variable: delete from the list when it is known nulcol=[]; for i=1:length(knownname) aux=knownname{i}; if strcmp('a',aux(1)) strcmp('iz',aux(1)) strcmp('iy',aux(1)) strcmp('j',aux (1)) typeknown(i)=3; AIzIyJvar=KnownName{i}; for j=1:lengthgsmvars auxvar=gsmvarsnames{j}; pos=strfind(auxvar,aiziyjvar); if ~isempty(pos) len=length(gsmvarsnames{j});

5/09/17 16:45 C:\Users\caminstech\Des...\BoundaryCond2.m 2 of 4 if valuevars(i)~=0 GSMVarsNames{j}=auxvar(setdiff(1:len,pos:pos+4)); GSMVarsNames{j}=''; nulcol=[nulcol,j]; factor(j)=factor(j)*valuevars(i); %--- QIz variable: delete from the list when it is known for i=1:length(knownname) aux=knownname{i}; if strcmp('qiz',aux(1)) typeknown(i)=4; QIzvar=KnownName{i}; for j=1:lengthgsmvars auxvar=gsmvarsnames{j}; pos=strfind(auxvar,qizvar); if ~isempty(pos) len=length(gsmvarsnames{j}); if valuevars(i)~=0 GSMVarsNames{j}=auxvar(setdiff(1:len,pos:pos+4)); GSMVarsNames{j}=''; nulcol=[nulcol,j]; factor(j)=factor(j)*valuevars(i); %--- QIy variable: delete from the list when it is known for i=1:length(knownname) aux=knownname{i}; if strcmp('qiy',aux(1)) typeknown(i)=4; QIyvar=KnownName{i}; for j=1:lengthgsmvars auxvar=gsmvarsnames{j}; pos=strfind(auxvar,qiyvar); if ~isempty(pos) len=length(gsmvarsnames{j}); if valuevars(i)~=0 GSMVarsNames{j}=auxvar(setdiff(1:len,pos:pos+4)); GSMVarsNames{j}=''; nulcol=[nulcol,j]; factor(j)=factor(j)*valuevars(i);

5/09/17 16:45 C:\Users\caminstech\Des...\BoundaryCond2.m 3 of 4 Alldisplacements=unique(GSMVarsNames); %--- Multiply by the factor associated with the E, A, Iz, G, J, QIz and QIy for i=1:lengthgsmvars GSM0(:,i)=GSM0(:,i)*factor(i); %--- BOUNDARY CONDITIONS %--- a) Identify the known deplacements knowndesplac=knownname(typeknown==0); valuedesplac=valuevars(typeknown==0); %--- b) Identify the null known deplacements (boundary conditions) nulldesplac=knowndesplac(valuedesplac==0); %--- c) Delete the null variables and GSM columns associated with for i=1:length(nulldesplac) auxd=nulldesplac{i}; for j=1:lengthgsmvars if ~isempty(strfind(gsmvarsnames{j},auxd)) GSMVarsNames(j)={''}; nulcol=[nulcol j]; validcolumn=setdiff(1:lengthgsmvars,nulcol); GSMVarsNames=GSMVarsNames(validcolumn); GSM1=GSM0(:,validcolumn); %--- GSM %--- get the equal columns together (deleting the repeated ones) allgsmvarsnames=unique(gsmvarsnames); [r,ni]=size(gsm1); if Symbway==0 GSM=zeros(r,length(allGSMVarsNames)); GSM=sym(zeros(r,length(allGSMVarsNames))); for i=1:length(allgsmvarsnames) aux=[]; for j=1:length(gsmvarsnames) if isequal(allgsmvarsnames(i),gsmvarsnames(j)); aux=[aux j]; GSM(:,i)=sum(GSM1(:,aux),2); %--- identify null columns in GSM and delete variable and column if Symbway==1 validcolumns=find(sum(abs(gsm),1)~=0);

5/09/17 16:45 C:\Users\caminstech\Des...\BoundaryCond2.m 4 of 4 validcolumns=find(sum(abs(gsm),1)>1e-14); GSM=GSM(:,validcolumns); GSMVarsNames=allGSMVarsNames(validcolumns); %--- Plotting information L=1; GSMnum=eval(GSM); %numerical GSM if ScreenOption==1 fprintf('--- After applying boundary conditions, GSM and variables:\n') GSM, PrintMatrix('GSMnum:',GSMnum,'%10.3f'); GSMVarsNames' if ScreenOption==2 [r,c]=size(gsmnum); fprintf('%%--- After applying boundary conditions, GSM and variables:\n'); % Symbolic GSM fprintf('symbolic GSM: $$%s$$\n',latex(gsm)); % Numeric GSM fprintf('numeric GSM: $$\\left(\\begin{array}{'); for i=1:c fprintf('c'); fprintf('}'); for i=1:r-1 for j=1:c-1 fprintf('%-10.3f & ',GSMnum(i,j)); fprintf('%-10.3f \\\\',GSMnum(i,)); %last column for j=1:c-1 %last row fprintf('%-10.3f & ',GSMnum(,j)); fprintf('%-10.3f \\{array}\\right)$$\n',gsmnum(,)); %last column and last row % GSM variables fprintf('gsm variables: $$\\left(\\begin{array}{c}'); for i=1:length(gsmvarsnames)-1 fprintf('%s \\\\ ',GSMVarsNames{i}); fprintf('%s \\{array}\\right)$$ \n\n',gsmvarsnames{});

5/09/17 16:45 C:\Users\caminstech\De...\BuildD_Matrix2.m 1 of 2 function [D,zk,zd,zp,invB1]=BuildD_Matrix(B,z,d) %From the system: B*z=d, where d=[h;0], z=[zd;zk;f] and B=[B1,B2,0;B3,B4,-I], %and B1 is a full-rank matrix whose number of rows is the length of H. %Explanation: [B1 B2 0]*[zd;zk;F]=[H]; B1*zd+B2*zk=H; zd=inv(b1)*h-inv(b1)*b2*zk, %quedando: D=-inv(B1)*B2 y zp=inv(b1)*h global ScreenOption error %--- To numeric way L=1; B=eval(B); %eliminate the variable L %--- Select the rows associated with the non-null terms of H: rows=find(d~=0); nullrows=length(d)-length(rows); %--- Identify the matrizes H,[B1 B2] and [z1; z2] H=d(rows); B1B2=B(rows,1:-nullrows); zdzk=z(1:-nullrows); %--- Select a full-rank matrix whose number of rows is the length of H [B1,rankM,selectedr,validcol]=FullRankMatrix(B1B2,error); nonvalidcol=setdiff(1:length(zdzk),validcol); B2=B1B2(:,nonvalidcol); %--- Identify the D matrix invb1=inv(b1); invb1(abs(invb1)<error)=0; %precision cleaning D=-invB1*B2; D(abs(D)<error)=0; %precision cleaning %--- Identify the key and depent variables zd=zdzk(validcol); zk=zdzk(nonvalidcol); %--- Calculate the particular solution zp=invb1*h; %--- Plotting information if ScreenOption==1 fprintf('--- D, zk, zd and zp:\n') D,zk,zd,zp if ScreenOption==2 if ~isempty(d) [r,c]=size(d); fprintf('\n%%--- D, zk, zd and zp:\n'); fprintf('d: $$\\left(\\begin{array}{'); for i=1:c fprintf('c'); fprintf('}'); for i=1:r-1 for j=1:c-1 if D(i,j)==0,

5/09/17 16:45 C:\Users\caminstech\De...\BuildD_Matrix2.m 2 of 2 fprintf('0 & '); fprintf('%-10.3f & ',D(i,j)); if D(i,)==0, fprintf('0 \\\\ '); fprintf('%-10.3f \\\\',D(i,)); %last column for j=1:c-1 %last row if D(,j)==0, fprintf('0 & '); fprintf('%-10.3f & ',D(,j)); if D(,)==0, fprintf('0 \\{array}\\right)$$\n '); fprintf('%-10.3f \\{array}\\right)$$\n',d(,)); %last column and last row % vector zk fprintf('zk vector: $$\\left(\\begin{array}{c}'); for i=1:length(zk)-1 fprintf('%s \\\\ ',zk{i}); fprintf('%s \\{array}\\right)$$ \n',zk{}); fprintf('d matrix is empty. \n\n'); % vector zd fprintf('zd vector: $$\\left(\\begin{array}{c}'); for i=1:length(zd)-1 fprintf('%s \\\\ ',zd{i}); fprintf('%s \\{array}\\right)$$ \n',zd{}); % vector zp fprintf('zp vector: $$%s$$\n',latex(zp));

5/09/17 16:45 C:\Users\caminstech\Des...\BuildMatrixB2.m 1 of 2 function [B,z,d]=BuildMatrixB2(GSM,GSMVarsNames,ForcesNames,KnownForces, KnownForcesValues) %B.z=d global ScreenOption %Vector of forces: rows UnknownForces=KnownForces(KnownForces==0); Nu=length(UnknownForces); %number of unknown forces Nk=length(KnownForces(KnownForces~=0)); %number of known forces posknownforces=knownforces(knownforces~=0)'; posunknownforces=setdiff(1:nk+nu,posknownforces); %--- Matrix B sortgsm=gsm([posknownforces,posunknownforces],:); B=[sortGSM,[zeros(Nk,Nu);-eye(Nu)]]; %--- unknown variables (z) z=[gsmvarsnames,forcesnames(posunknownforces)']; %--- Indepent term (d) d=[knownforcesvalues(knownforces~=0);zeros(nu,1)]; %--- Plotting information L=1; Bnum=eval(B); %numerical B if ScreenOption==1 fprintf('--- B, z and d:\n') B PrintMatrix('Bnum:',Bnum,'%10.3f'); z',d if ScreenOption==2 [r,c]=size(bnum); fprintf('%%--- B, z and d:\n'); % Symbolic B fprintf('symbolic B: $$%s$$\n',latex(b)); % Numeric B fprintf('numeric B: $$\\left(\\begin{array}{'); for i=1:c fprintf('c'); fprintf('}'); for i=1:r-1 for j=1:c-1 fprintf('%-10.3f & ',Bnum(i,j)); fprintf('%-10.3f \\\\',Bnum(i,)); %last column for j=1:c-1 %last row fprintf('%-10.3f & ',Bnum(,j)); fprintf('%-10.3f \\{array}\\right)$$\n',bnum(,)); %last column and last row % vector z

5/09/17 16:45 C:\Users\caminstech\Des...\BuildMatrixB2.m 2 of 2 fprintf('z vector: $$\\left(\\begin{array}{c}'); for i=1:length(z)-1 fprintf('%s \\\\ ',z{i}); fprintf('%s \\{array}\\right)$$ \n',z{}); % vector d fprintf('d vector: $$%s$$\n',latex(d));

5/09/17 16:46 C:\Users\caminstech\Des...\BuildMatrixD2.m 1 of 3 function [D,zk,zd,zp,BInv]=BuildMatrixD2(B,z,d) %Depence matrix, key var., depent var. and particular solution %From the system: B*z=d, where d=[h;0] and z=[zi;f], identify the relation: %[zd]=[zp]+[d]*[zk] global ScreenOption %--- To numeric way % if Symbway==1 L=1; B=eval(B); %eliminate the variable L % %--- Calculate the null space NullSpace=null(B,'r'); [r,c]=size(nullspace); %--- Identify the identity matrix EyeElement=zeros(c,1); % % % % %%%%% % % % % aux=zeros(length(d),1); % % % % ll=max(find(d~=0)); % % % % aux2=rand(1,ll); % % % % aux(d~=0)=aux2'; % % % % parsol=b\aux; % % % % EyeElement=find(parsol==0); % % % % %%%% parsol=b\d; posiblepos=find(parsol==0); for i=1:c %vector [0 0.. 1.. 0] aux=zeros(1,c); aux(i)=1; %find the row for j=posiblepos' %for the rows with null particular solution if isequal(aux,nullspace(j,:))) % if isequal(aux,abs(nullspace(j,:))) %OJOOOOOO: aquí igualo 1 o -1!!!! OJO EyeElement(i)=j %save the row: number associated with ValidVar posiblepos=setdiff(posiblepos,j); %delete this possible position break NonEyeElement=setdiff(1:r,EyeElement); %number associated with ValidVar %--- Identify the D matrix D=NullSpace(NonEyeElement,:); %--- Identify the key and depent variables zk=z(eyeelement); zd=z(noneyeelement); %--- Calculate the particular solution Baux=B(:,NonEyeElement);

5/09/17 16:46 C:\Users\caminstech\Des...\BuildMatrixD2.m 2 of 3 % partaux=baux\d; BInv=inv(Baux); BInv(abs(BInv)<1e-12)=0; %precision cleaning partaux=binv*d; zp=[zeros(c,1);partaux]; %--- Plotting information if ScreenOption==1 fprintf('--- D, zk, zd and zp:\n') D,zk,zd,zp if ScreenOption==2 if ~isempty(d) [r,c]=size(d); fprintf('\n%%--- D, zk, zd and zp:\n'); fprintf('d: $$\\left(\\begin{array}{'); for i=1:c fprintf('c'); fprintf('}'); for i=1:r-1 for j=1:c-1 if D(i,j)==0, fprintf('0 & '); fprintf('%-10.3f & ',D(i,j)); if D(i,)==0, fprintf('0 \\\\ '); fprintf('%-10.3f \\\\',D(i,)); %last column for j=1:c-1 %last row if D(,j)==0, fprintf('0 & '); fprintf('%-10.3f & ',D(,j)); if D(,)==0, fprintf('0 \\{array}\\right)$$\n '); fprintf('%-10.3f \\{array}\\right)$$\n',d(,)); %last column and last row % vector zk fprintf('zk vector: $$\\left(\\begin{array}{c}'); for i=1:length(zk)-1 fprintf('%s \\\\ ',zk{i}); fprintf('%s \\{array}\\right)$$ \n',zk{}); fprintf('d matrix is empty. \n\n');

5/09/17 16:46 C:\Users\caminstech\Des...\BuildMatrixD2.m 3 of 3 % vector zd fprintf('zd vector: $$\\left(\\begin{array}{c}'); for i=1:length(zd)-1 fprintf('%s \\\\ ',zd{i}); fprintf('%s \\{array}\\right)$$ \n',zd{}); % vector zp fprintf('zp vector: $$%s$$\n',latex(zp));

5/09/17 16:46 C:\Users\caminstech\De...\CALCULOFINAL42.m 1 of 5 function CALCULOFINAL4 global error clc M=B; [neq,ncol]=size(m); while 1 %--- Multiply each column of M by the corresponding measurement factor=cell(1,ncol); sympl_x=z; % a)find any measurement in the complex variable and simplify the complex variables for i=1:ncol aux1=sympl_x{i}; for j=1:length(vars); aux2=char(vars(j)); commtxt=strfind(aux1,aux2); %find common text if ~isempty(commtxt) validtxt=setdiff(1:length(aux1),commtxt:commtxt+4); %valid text position aux1=aux1(validtxt); sympl_x{i}=aux1; if isempty(sympl_x{i}) sympl_x{i}=''; if isempty(factor{i}) factor{i}=aux2; factor{i}=[factor{i},'*',aux2]; %(factor,sympl_x such as x=factor*sympl_x) % b) evalue the introduced data for j=1:length(vars) eval(sprintf('syms %s;',char(vars(j)))) % c) multiply the matrix by the factors M1=M; for i=1:ncol if ~isempty(factor{i}) M1(:,i)= M(:,i)*eval(factor{i}); % d) get together the columns asociated with the equal terms x=unique(sympl_x); M2=sym(zeros(neq,length(x))); for i=1:length(x) pos=[]; %find the position of the equal terms for j=1:length(sympl_x)

5/09/17 16:46 C:\Users\caminstech\De...\CALCULOFINAL42.m 2 of 5 if strcmp(x{i},sympl_x{j}) %equal terms pos=[pos j]; M2(:,i)=sum(M1(:,pos),2); % e)if there is a completely known term, the associated column is moved to the indepent term % e.1) identify the completely known term complknown=[]; for i=1:length(x) if isempty(x{i}) complknown=[complknown, i]; keptvar=setdiff(1:length(x),complknown); one % e.2) update the matrices x=x(keptvar); indterm=zeros(neq,1); %indepent term %when there is any completly known term, this term is written as the indepent if ~isempty(complknown) indterm=-m2(:,complknown); M2=M2(:,keptvar); %(in this point, M2*x=zpdast+indterm) %--- Results [r,c]=size(m2); IT=d+indterm; % d)nullspace and null collumns % d.1) null space NS=null(M2); % d.2) null rows identvars=zeros(c,1); for i=1:c if sum(abs(ns(i,:)))==0 identvars(i)=1; unique_x=x(identvars==1); if any(identvars==1)~=0 % d.3) numerical solution for j=1:length(vars) eval(sprintf('%s=%d;',char(vars(j)),double(numvars(j)))) % evalue the introduced data L=1; %Val=eval(M2)\eval(IT); a=eval(m2);

5/09/17 16:46 C:\Users\caminstech\De...\CALCULOFINAL42.m 3 of 5 b=eval(it); Val=pinv(a, 1e-20)*b; %Calculation as a Pseudo inverse Val=Val(identVars==1); %--- Postprocess (simplify complex variables) % a) separate the simple vars from the other ones simplvar={}; complvar={}; possimplvar=[]; %positions of the simple variables poscomplvar=[]; %positions of the complex variables for i=1:length(unique_x) if length(char(unique_x{i}))==5 simplvar=[simplvar,unique_x{i}]; possimplvar=[possimplvar,i]; complvar=[complvar,unique_x{i}]; poscomplvar=[poscomplvar,i]; nsimplvar=length(simplvar); simplval=val(possimplvar); % b) when there is any complex var, I try to simplify ind=[]; if ~isempty(complvar) for i=1:length(complvar) aux1=complvar{i}; for j=1:nsimplvar aux2=simplvar{j}; commtxt=strfind(aux1,aux2); %find common text if ~isempty(commtxt) validtxt=setdiff(1:length(aux1),commtxt:commtxt+4); %valid text position aux1=aux1(validtxt); simplvar=[simplvar,aux1]; simplval=[simplval;val(poscomplvar(i))/val(possimplvar(j))]; ind=[ind, i]; valid=setdiff(1:length(complvar),ind); complvar=complvar(valid); poscomplvar=poscomplvar(valid); % c) try to identify vars in subsystems if ~isempty(complvar) [simplvar1,simplval1]=observcouples(complvar,val(poscomplvar),error); simplvar=[simplvar,simplvar1']; simplval=[simplval,simplval1]; % d) save data to repeat the process nsimplvar=length(simplvar); if ~isempty(simplvar)

5/09/17 16:46 C:\Users\caminstech\De...\CALCULOFINAL42.m 4 of 5 break break for i=1:nsimplvar Vars=[Vars; sym(simplvar{i})]; NumVars=[NumVars, simplval']; Cumvars=[Cumvars, simplvar]; Cumres=[Cumres; simplval]; %------------------------------------------------------------------------ function [SingleVars,SingleVal]=ObservCouples(var,val,error) % log(var)=abs(val) SingleVars={}; SingleVal=[]; %delete zeros indzeros=find(abs(val)<error); for i=indzeros' if length(var{i})<6 SingleVars=[SingleVars;var{i} ]; SingleVal=[SingleVal; 0]; valid=setdiff(1:length(val),indzeros); var=var(valid); val=val(valid); % logabsval=log(abs(val)); r=length(val); %identifyes the single variables singles=cell(1,2*r); sings=ones(1,2*r); delet=[]; for i=1:r singles{i}=var{i}(1:5); if ~any([strcmp(singles{i}(1),'a'),strcmp(singles{i}(1),'iz'),strcmp(singles{i} (1),'Iy'),strcmp(singles{i}(1),'G')]) sings(i)=sign(val(i)); if length(var{i})>5 singles{i+r}=var{i}(6:); if ~any([strcmp(singles{i+r}(1),'a'),strcmp(singles{i+r}(1),'iz'),strcmp (singles{i}(1),'iy'),strcmp(singles{i}(1),'g')]) sings(i+r)=sign(val(i));

5/09/17 16:46 C:\Users\caminstech\De...\CALCULOFINAL42.m 5 of 5 delet=[delet,i+r]; singles=singles(setdiff(1:2*r,delet)); [singles,ind,ni]=unique(singles); sings=sings(ind); %build the 0/1 matrix log(var) c=length(singles); A=zeros(r,c); for i=1:r for j=1:c if findstr(var{i},singles{j}) A(i,j)=1; %solve the system % 1) null space NS=null(A,'r'); NS(abs(NS)<error)=0; % 2) null rows identvars=zeros(c,1); for i=1:c if sum(abs(ns(i,:)))==0 identvars(i)=1; unique_s=singles(identvars==1); sings=sings(identvars==1); if any(identvars==1)~=0 % 3) numerical solution Val=exp(A(:,identVars==1)\logabsval); % 4) recover sign Val=Val.*sings'; % Save results SingleVars=[SingleVars;unique_s' ]; SingleVal=[SingleVal; Val];

5/09/17 16:46 C:\Users\caminstech\Deskto...\CheckData2.m 1 of 7 function CheckData2(nbeams) global knowndxdydzwxwywz global valuedxdydzwxwywz global knownfxfyfzmxmymz global valuefxfyfzmxmymz global knowneaiziygjqizqiy global valueeaiziygjqizqiy global knowneaeizeiygjeqizeqiy global valueeaeizeiygjeqizeqiy global subbeamseaiziygjqizqiy global ScreenOption global beamlength corrected=0; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Checks compatibility of knowneaiziygjqizqiy and knowneaeizeiygjeqizeqiy %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% if ScreenOption==3 fprintf('%%--- Initial DATA\n'); PrintCellMatrix('knownEAIzIyGJQIzQIy',knownEAEIzEIyGJEQIzEQIy,'%4d'); PrintPrettyLatex('valueEAIzIyGJQIzQIy',valueEAIzIyGJQIzQIy); PrintCellMatrix('knownEAEIzEIyGJEQIzEQIy',knownEAEIzEIyGJEQIzEQIy,'%4d'); PrintPrettyLatex('valueEAEIzEIyGJEQIzEQIy',valueEAEIzEIyGJEQIzEQIy); PrintCellMatrix('knowndxdydzwxwywz',knowndxdydzwxwywz,'%4d'); PrintPrettyLatex('valuedxdydzwxwywz',valuedxdydzwxwywz); PrintCellMatrix('knownfxfyfzmxmymz',knownfxfyfzmxmymz,'%4d'); PrintPrettyLatex('valuefxfyfzmxmymz',valuefxfyfzmxmymz); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Check equal lengths %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% for k=1:8 if length(knowneaiziygjqizqiy{k})~=length(valueeaiziygjqizqiy{k}) fprintf('unequal lengths of cells knowneaiziygjqizqiy and valueeaiziygjqizqiy\n'); corrected=1; for k=1:6 if length(knowndxdydzwxwywz{k})~=length(valuedxdydzwxwywz{k}) fprintf('unequal lengths of cells knownuvw and valuedxdydzwxwywz\n'); corrected=1; if length(knownfxfyfzmxmymz{k})~=length(valuefxfyfzmxmymz{k}) fprintf('unequal lengths of cells knownfxfyfzmxmymz and valuefxfyfzmxmymz\n'); corrected=1; if length(knowneaeizeiygjeqizeqiy{k})~=length(valueeaeizeiygjeqizeqiy{k}) fprintf('unequal lengths of cells knowneaeizeiygjeqizeqiy and valueeaeizeiygjeqizeqiy\n'); corrected=1;

5/09/17 16:46 C:\Users\caminstech\Deskto...\CheckData2.m 2 of 7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Check that all beams appear in subbeamseaiziyqizqiy %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% for k=1:8 if length(subbeamseaiziygjqizqiy{k})~=nbeams fprintf('incorrect length of subbeamseaiziygjqizqiy\n'); corrected=1; maxtype=max([max(subbeamseaiziygjqizqiy{1}(:)),max(subbeamseaiziygjqizqiy{2}(:)),max (subbeamseaiziygjqizqiy{3}(:)),max(subbeamseaiziygjqizqiy{4}(:)),max (subbeamseaiziygjqizqiy{5}(:)),max(subbeamseaiziygjqizqiy{6}(:))]); for k=1:5 for type=1:maxtype switch k case 1 % case E % if E of a given type is known, it cannot appear in a beam % with known EA, EIz or EIy of the same type BeamsWithTypeE=find(subbeamsEAIzIyGJQIzQIy{1}==type); loc=find(knowneaiziygjqizqiy{1}==type); if loc>0 BeamsWithTypeEandKnownEA=intersect(knownEAIzIyGJQIzQIy{1}, BeamsWithTypeE); for ss=1:length(beamswithtypeeandknownea) corrected=1; beam=beamswithtypeeandknownea(ss); locbeam=find(knowneaeizeiygjeqizeqiy{1}==beam); typea=subbeamseaiziygjqizqiy{2}(beam); loc1=find(knowneaiziygjqizqiy{2},typea); if isempty(loc1) knowneaiziygjqizqiy{2}=[knowneaiziygjqizqiy{2} typea]; valueeaiziygjqizqiy{2}=[valueeaiziygjqizqiy{2} valueeaeizeiygjeqizeqiy{1}(locbeam)/valueeaiziygjqizqiy{1}(loc)]; knowneaeizeiygjeqizeqiy{1}=remove(knowneaeizeiygjeqizeqiy{1} (:),locbeam); valueeaeizeiygjeqizeqiy{1}=remove(valueeaeizeiygjeqizeqiy{1} (:),locbeam); fprintf('beam %5.0f cannot have EA known because its E%5.0f is known\n',beam,type); fprintf('we correct this be making the A%5.0f known instead\n',typea); BeamsWithTypeEandKnownEIz=intersect(knownEAEIzEIyGJEQIzEQIy{2}, BeamsWithTypeE); for ss=1:length(beamswithtypeeandknowneiz) corrected=1; beam=beamswithtypeeandknowneiz(ss); locbeam=find(knowneaeizeiygjeqizeqiy{2}==beam); typeiz=subbeamseaiziygjqizqiy{3}(beam); loc1=find(knowneaiziygjqizqiy{3},typeiz); if isempty(loc1)

5/09/17 16:46 C:\Users\caminstech\Deskto...\CheckData2.m 3 of 7 knowneaiziygjqizqiy{3}=[knowneaiziygjqizqiy{3} typeiz]; valueeaiziygjqizqiy{3}=[valueeaiziygjqizqiy{3} valueeaeizeiygjeqizeqiy{2}(locbeam)/valueeaiziygjqizqiy{1}(loc)]; knowneaeizeiygjeqizeqiy{1}=remove(knowneaeizeiygjeqizeqiy{2} (:),locbeam); valueeaeizeiygjeqizeqiy{1}=remove(valueeaeizeiygjeqizeqiy{2} (:),locbeam); fprintf('beam %5.0f cannot have EIz known because its E%5.0f is known\n',beam,type); fprintf('we correct this be making the Iz%5.0f known instead\n',typeiz); BeamsWithTypeEandKnownEIy=intersect(knownEAEIzEIyGJEQIzEQIy{2}, BeamsWithTypeE); for ss=1:length(beamswithtypeeandknowneiy) corrected=1; beam=beamswithtypeeandknowneiy(ss); locbeam=find(knowneaeizeiygjeqizeqiy{3}==beam); typeiy=subbeamseaiziygjqizqiy{4}(beam); loc1=find(knowneaiziygjqizqiy{4},typeiy); if isempty(loc1) knowneaiziygjqizqiy{4}=[knowneaiziygjqizqiy{4} typeiy]; valueeaiziygjqizqiy{4}=[valueeaiziygjqizqiy{4} valueeaeizeiygjeqizeqiy{3}(locbeam)/valueeaiziygjqizqiy{1}(loc)]; knowneaeizeiygjeqizeqiy{1}=remove(knowneaeizeiygjeqizeqiy{3} (:),locbeam); valueeaeizeiygjeqizeqiy{1}=remove(valueeaeizeiygjeqizeqiy{3} (:),locbeam); fprintf('beam %5.0f cannot have EIy known because its E%5.0f is known\n',beam,type); fprintf('we correct this be making the Iy%5.0f known instead\n',typeiy); case 2 % case A % if A of a given type is known, it cannot appear in a beam % with known EA of the same type BeamsWithTypeA=find(subbeamsEAIzIyGJQIzQIy{2}==type); loc=find(knowneaiziygjqizqiy{2}==type); if loc>0 BeamsWithTypeAandKnownEA=intersect(knownEAEIzEIyGJEQIzEQIy{1}, BeamsWithTypeA); for ss=1:length(beamswithtypeaandknownea) corrected=1; beam=beamswithtypeaandknownea(ss); locbeam=find(knowneaeizeiygjeqizeqiy{1}==beam); typee=subbeamseaiziygjqizqiy{1}(beam); loc1=find(knowneaiziygjqizqiy{1},typee); if isempty(loc1) knowneaiziygjqizqiy{1}=[knowneaiziygjqizqiy{1} typee]; valueeaiziygjqizqiy{1}=[valueeaiziygjqizqiy{1} valueeaeizeiygjeqizeqiy{1}(locbeam)/valueeaiziygjqizqiy{2}(loc)];

5/09/17 16:46 C:\Users\caminstech\Deskto...\CheckData2.m 4 of 7 knowneaeizeiygjeqizeqiy{1}=remove(knowneaeizeiygjeqizeqiy{1} (:),locbeam); valueeaeizeiygjeqizeqiy{1}=remove(valueeaeizeiygjeqizeqiy{1} (:),locbeam); fprintf('beam %5.0f cannot have EA known because its A%5.0f is known\n',beam,type); fprintf('we correct this be making the E%5.0f known instead\n',typee); case 3 % case Iz and Iy % if Iz or Iy of a given type is known, it cannot appear in a beam % with known EIz or EIy of the same type BeamsWithTypeIz=find(subbeamsEAIzIyGJQIzQIy{3}==type); loc=find(knowneaiziygjqizqiy{3}==type); if loc>0 BeamsWithTypeIandKnownEIz=intersect(knownEAEIzEIyGJEQIzEQIy{2}, BeamsWithTypeIz); for ss=1:length(beamswithtypeiandknowneiz) corrected=1; beam=beamswithtypeiandknowneiz(ss); locbeam=find(knowneaeizeiygjeqizeqiy{2}==beam); typee=subbeamseaiziygjqizqiy{1}(beam); loc1=find(knowneaiziygjqizqiy{1},typee); if isempty(loc1) knowneaiziygjqizqiy{1}=[knowneaiziygjqizqiy{1} typee]; valueeaiziygjqizqiy{1}=[valueeaiziygjqizqiy{1} valueeaeizeiygjeqizeqiy{2}(locbeam)/valueeaiziygjqizqiy{3}(loc)]; knowneaeizeiygjeqizeqiy{1}=remove(knowneaeizeiygjeqizeqiy{2} (:),locbeam); valueeaeizeiygjeqizeqiy{1}=remove(valueeaeizeiygjeqizeqiy{2} (:),locbeam); fprintf('beam %5.0f cannot have EA known because its I%5.0f is known\n',beam,type); fprintf('we correct this be making the E%5.0f known instead\n',typee); BeamsWithTypeIy=find(subbeamsEAIzIyGJQIzQIy{4}==type); loc=find(knowneaiziygjqizqiy{4}==type); if loc>0 BeamsWithTypeIandKnownEIy=intersect(knownEAEIzEIyGJEQIzEQIy{2}, BeamsWithTypeIy); for ss=1:length(beamswithtypeiandknowneiy) corrected=1; beam=beamswithtypeiandknowneiy(ss); locbeam=find(knowneaeizeiygjeqizeqiy{3}==beam); typee=subbeamseaiziygjqizqiy{1}(beam); loc1=find(knowneaiziygjqizqiy{1},typee); if isempty(loc1) knowneaiziygjqizqiy{1}=[knowneaiziygjqizqiy{1} typee]; valueeaiziygjqizqiy{1}=[valueeaiziygjqizqiy{1} valueeaeizeiygjeqizeqiy{3}(locbeam)/valueeaiziygjqizqiy{4}(loc)];

5/09/17 16:46 C:\Users\caminstech\Deskto...\CheckData2.m 5 of 7 knowneaeizeiygjeqizeqiy{1}=remove(knowneaeizeiygjeqizeqiy{3} (:),locbeam); valueeaeizeiygjeqizeqiy{1}=remove(valueeaeizeiygjeqizeqiy{3} (:),locbeam); fprintf('beam %5.0f cannot have EA known because its I%5.0f is known\n',beam,type); fprintf('we correct this be making the E%5.0f known instead\n',typee); case 4 % case G % if G of a given type is known, it cannot appear in a beam % with known GJ of the same type BeamsWithTypeG=find(subbeamsEAIzIyGJQIzQIy{5}==type); loc=find(knowneaiziygjqizqiy{5}==type); if loc>0 BeamsWithTypeGandKnownGJ=intersect(knownEAIzIyGJQIzQIy{5}, BeamsWithTypeG); for ss=1:length(beamswithtypegandknowngj) corrected=1; beam=beamswithtypegandknowngj(ss); locbeam=find(knowneaeizeiygjeqizeqiy{4}==beam); typej=subbeamseaiziygjqizqiy{6}(beam); loc1=find(knowneaiziygjqizqiy{6},typej); if isempty(loc1) knowneaiziygjqizqiy{6}=[knowneaiziygjqizqiy{6} typej]; valueeaiziygjqizqiy{6}=[valueeaiziygjqizqiy{6} valueeaeizeiygjeqizeqiy{4}(locbeam)/valueeaiziygjqizqiy{5}(loc)]; knowneaeizeiygjeqizeqiy{4}=remove(knowneaeizeiygjeqizeqiy{4} (:),locbeam); valueeaeizeiygjeqizeqiy{4}=remove(valueeaeizeiygjeqizeqiy{4} (:),locbeam); fprintf('beam %5.0f cannot have GJ known because its G%5.0f is known\n',beam,type); fprintf('we correct this be making the J%5.0f known instead\n',typej); case 5 % case J % if J of a given type is known, it cannot appear in a beam % with known GJ of the same type BeamsWithTypeJ=find(subbeamsEAIzIyGJQIzQIy{6}==type); loc=find(knowneaiziygjqizqiy{6}==type); if loc>0 BeamsWithTypeJandKnownGJ=intersect(knownEAEIzEIyGJEQIzEQIy{4}, BeamsWithTypeJ); for ss=1:length(beamswithtypejandknowngj) corrected=1; beam=beamswithtypejandknowngj(ss); locbeam=find(knowneaeizeiygjeqizeqiy{4}==beam); typeg=subbeamseaiziygjqizqiy{5}(beam); loc1=find(knowneaiziygjqizqiy{5},typeg); if isempty(loc1) knowneaiziygjqizqiy{5}=[knowneaiziygjqizqiy{5} typeg];

5/09/17 16:46 C:\Users\caminstech\Deskto...\CheckData2.m 6 of 7 valueeaiziygjqizqiy{5}=[valueeaiziygjqizqiy{5} valueeaeizeiygjeqizeqiy{4}(locbeam)/valueeaiziygjqizqiy{6}(loc)]; knowneaeizeiygjeqizeqiy{4}=remove(knowneaeizeiygjeqizeqiy{4} (:),locbeam); valueeaeizeiygjeqizeqiy{4}=remove(valueeaeizeiygjeqizeqiy{4} (:),locbeam); fprintf('beam %5.0f cannot have GJ known because its J%5.0f is known\n',beam,type); fprintf('we correct this be making the G%5.0f known instead\n',typeg); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Check shear parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Due to the formulation of the shear parameter Q=(24*I^2*(v+1))/(Ac*L^2+24*I*(v+1)) % it is necesary to have the same number of I and Q. Besides this, if the % length of the beam (L) change the Q parameter have to change too. for k=1:length(subbeamseaiziygjqizqiy{3}) if (subbeamseaiziygjqizqiy{3}(k))~=(subbeamseaiziygjqizqiy{7}(k)) fprintf('insufficient number of Q in subbeamseaiziygjqizqiy according to the number of Iz\n'); corrected=1; for k=1:length(subbeamseaiziygjqizqiy{4}) if (subbeamseaiziygjqizqiy{4}(k))~=(subbeamseaiziygjqizqiy{8}(k)) fprintf('insufficient number of Q in subbeamseaiziygjqizqiy according to the number of Iy\n'); corrected=1; for k=1:length(beamlength)-1 if (beamlength(k))~=(beamlength(k+1)) if (subbeamseaiziygjqizqiy{7}(k))>=(subbeamseaiziygjqizqiy{7}(k+1)) fprintf('insufficient number of Q in subbeamseaiziygjqizqiy due to different beam length\n'); corrected=1; for k=1:length(beamlength)-1 if (beamlength(k))~=(beamlength(k+1)) if (subbeamseaiziygjqizqiy{8}(k))>=(subbeamseaiziygjqizqiy{8}(k+1)) fprintf('insufficient number of Q in subbeamseaiziygjqizqiy due to different beam length\n'); corrected=1;

5/09/17 16:46 C:\Users\caminstech\Deskto...\CheckData2.m 7 of 7 if corrected==1 pause(2); fprintf('corrected MATRICES:\n'); fprintf('****************************************\n'); PrintCellMatrix('knownEAIzIyGJQIzQIy',knownEAIzIyGJQIzQIy,'%4d'); PrintPrettyLatex('valueEAIzIyGJQIzQIy',valueEAIzIyGJQIzQIy); PrintCellMatrix('knownEAEIzEIyGJEQIzEQIy',knownEAEIzEIyGJEQIzEQIy,'%4d'); PrintPrettyLatex('valueEAEIzEIyGJEQIzEQIy',valueEAEIzEIyGJEQIzEQIy); PrintCellMatrix('knowndxdydzwxwywz',knowndxdydzwxwywz,'%4d'); PrintPrettyLatex('valuedxdydzwxwywz',valuedxdydzwxwywz); PrintCellMatrix('knownfxfyfzmxmymz',knownfxfyfzmxmymz,'%4d'); PrintPrettyLatex('valuefxfyfzmxmymz',valuefxfyfzmxmymz);

5/09/17 16:46 C:\Users\caminstech\Deskto...\choosebox2.m 1 of 7 function [selection,value] = choosebox(varargin) %CHOOSEBOX Two-listed item selection dialog box. % [SELECTION,OK] = CHOOSEBOX('ListString',S) creates a modal dialog box % which allows you to select a string or multiple strings from a list. % Single or multiple strings can be transferred from a base list to a % selection list using an arrow-button. Single strings also can be % transferred by double-clicking; single or multiple strings are % transferred by pressing <CR>. % SELECTION is a vector of indices of the selected strings (length 1 % in the single selection mode). The indices will be in the order of % selection from the base list. If a group of multiple strings is % selected, its order inside the group will not change, but different % groups are ordered by their selection. % OK is 1 if you push the OK button, or 0 if you push the Cancel % button or close the figure. In that case SELECTION will be [], % regardless to the actual selection list. % Important parameter is 'ChooseMode', see list below. % % Inputs are in parameter,value pairs: % % Parameter Description % 'ChooseMode' string; can be 'pick' or 'copy'. % When set to 'pick', transferred string items from the % base list box are removed. When retransferred, they % again are listed in their initial positions. % When set to 'copy', transferred string items remain in % the base list and can be transferred several times. % default is 'pick'. % 'ListString' cell array of strings for the base list box. % 'SelectionMode' string; can be 'single' or 'multiple'; defaults to % 'multiple'. % 'ListSize' [width height] of listbox in pixels; defaults % to [160 300]. % 'InitialValue' vector of indices of which items of the list box % are initially selected; defaults to none []. % 'Name' String for the figure's title. Defaults to ''. % 'PromptString' string matrix or cell array of strings which appears % as text above the base list box. Defaults to {}. % 'SelectString' string matrix or cell array of strings which appears % as text above the selection list box. Defaults to {}. % 'OKString' string for the OK button; defaults to 'OK'. % 'CancelString' string for the Cancel button; defaults to 'Cancel'. % 'uh' uicontrol button height, in pixels; default = 18. % 'fus' frame/uicontrol spacing, in pixels; default = 8. % 'ffs' frame/figure spacing, in pixels; default = 8. % % Example: % d = dir; % str = {d.name}; % [s,v] = choosebox('name','file deletion',... % 'PromptString','Files remaining in this directory:',... % 'SelectString','Files to delete:',... % 'ListString',str) % % inspired by listdlg.m from Mathworks.

5/09/17 16:46 C:\Users\caminstech\Deskto...\choosebox2.m 2 of 7 % % programmed by Peter Wasmeier, Technical University of Munich % p.wasmeier@bv.tum.de % 11-12-03 error(nargchk(1,inf,nargin)) arrow=[... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 0 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]; for i=1:3 rarrow(:,:,i)=arrow; larrow(:,:,i)=fliplr(arrow); clear arrow; figname = ''; smode = 2; % (multiple) cmode = 1; % remove from left hand side promptstring = {}; selectstring={}; liststring = []; listsize = [160 300];

5/09/17 16:46 C:\Users\caminstech\Deskto...\choosebox2.m 3 of 7 initialvalue = []; okstring = 'Ok'; cancelstring = 'Cancel'; fus = 8; ffs = 8; uh = 18; if mod(length(varargin),2) ~= 0 % input args have not com in pairs, woe is me error('arguments to LISTDLG must come param/value in pairs.') for i=1:2:length(varargin) switch lower(varargin{i}) case 'name' figname = varargin{i+1}; case 'promptstring' promptstring = varargin{i+1}; case 'selectstring' selectstring = varargin{i+1}; case 'selectionmode' switch lower(varargin{i+1}) case 'single' smode = 1; case 'multiple' smode = 2; case 'choosemode' switch lower(varargin{i+1}) case 'pick' cmode = 1; case 'copy' cmode = 2; case 'listsize' listsize = varargin{i+1}; case 'liststring' liststring = varargin{i+1}; case 'initialvalue' initialvalue = varargin{i+1}; case 'uh' uh = varargin{i+1}; case 'fus' fus = varargin{i+1}; case 'ffs' ffs = varargin{i+1}; case 'okstring' okstring = varargin{i+1}; case 'cancelstring' cancelstring = varargin{i+1}; otherwise error(['unknown parameter name passed to LISTDLG. Name was ' varargin{i}]) if isstr(promptstring)

5/09/17 16:46 C:\Users\caminstech\Deskto...\choosebox2.m 4 of 7 promptstring = cellstr(promptstring); if isstr(selectstring) selectstring = cellstr(selectstring); if isempty(initialvalue) initialvalue = 1; if isempty(liststring) error('liststring parameter is required.') ex = get(0,'defaultuicontrolfontsize')*1.7; % height extent per line of uicontrol text (approx) fp = get(0,'defaultfigureposition'); w = 4*fus +2*ffs+2*listsize(1)+50; h = 2*ffs+7*fus+ex*length(promptstring)+listsize(2)+2*uh; fp = [fp(1) fp(2)+fp(4)-h w h]; % keep upper left corner fixed fig_props = {... 'name' figname... 'resize' 'off'... 'numbertitle' 'off'... 'menubar' 'none'... 'windowstyle' 'modal'... 'visible' 'off'... 'createfcn' ''... 'position' fp... 'closerequestfcn' 'delete(gcbf)'... }; ad.fromstring=cellstr(liststring); ad.tostring=''; ad.pos_left=[1:size(ad.fromstring,2)]'; ad.pos_right=[]; ad.value=0; ad.cmode=cmode; setappdata(0,'listdialogappdata',ad) fig = figure(fig_props{:}); uicontrol('style','frame', 'position',[1 1 fp([3 4])]) % uicontrol('style','frame', 'position',[ffs ffs 2*fus+listsize(1) 2*fus+uh]) % uicontrol('style','frame','position',[ffs+2*fus+50+listsize(1) ffs 2*fus+listsize(1) 2*fus+uh]) % uicontrol('style','frame','position',[ffs ffs+3*fus+uh 2*fus+listsize(1)... % listsize(2)+3*fus+ex*length(promptstring)+(uh+fus)*(smode==2)]) % uicontrol('style','frame', 'position',[ffs+2*fus+50+listsize(1) ffs+3*fus+uh 2*fus+listsize(1)... % listsize(2)+3*fus+ex*length(promptstring)+(uh+fus)*(smode==2)])

5/09/17 16:46 C:\Users\caminstech\Deskto...\choosebox2.m 5 of 7 if length(promptstring)>0 prompt_text = uicontrol('style','text','fontsize',9,'string',promptstring,... 'horizontalalignment','left','units','pixels',... 'position',[ffs+fus fp(4)-(ffs+fus+ex*length (promptstring))... listsize(1) ex*length(promptstring)]); if length(selectstring)>0 select_text = uicontrol('style','text','fontsize',9,'string',selectstring,... 'horizontalalignment','left','units','pixels',... 'position',[ffs+3*fus+listsize(1)+50 fp(4)- (ffs+fus+ex*length(promptstring))... listsize(1) ex*length(selectstring)]); btn_wid = listsize(1); leftbox = uicontrol('style','listbox',... 'position',[ffs+fus ffs+uh+4*fus listsize(1) listsize(2)+25],... 'FontSize',9,'string',ad.fromstring,... 'backgroundcolor','w',... 'max',2,... 'tag','leftbox',... 'value',initialvalue,... 'callback',{@dofromboxclick}); rightbox = uicontrol('style','listbox',... 'position',[ffs+3*fus+listsize(1)+50 ffs+uh+4*fus listsize(1) listsize(2)+25],... 'FontSize',9,'string',ad.tostring,... 'backgroundcolor','w',... 'max',2,... 'tag','rightbox',... 'value',[],... 'callback',{@dotoboxclick}); ok_btn = uicontrol('style','pushbutton',... 'FontSize',9,'string',okstring,... 'position',[fus+ffs+btn_wid/2 ffs+fus btn_wid/2 uh],... 'callback',{@dook}); cancel_btn = uicontrol('style','pushbutton',... 'FontSize',9,'string',cancelstring,... 'position',[ffs+3*fus+btn_wid+50 ffs+fus btn_wid/2 uh],... 'callback',{@docancel}); toright_btn = uicontrol('style','pushbutton',... 'position',[ffs+2*fus+10+listsize(1) ffs+uh+4*fus+(smode==2)* (fus+uh)+listsize(2)/2-25 30 30],... 'cdata',rarrow,... 'callback',{@doright}); toleft_btn = uicontrol('style','pushbutton',... 'position',[ffs+2*fus+10+listsize(1) ffs+uh+4*fus+(smode==2)* (fus+uh)+listsize(2)/2+25 30 30],...

5/09/17 16:46 C:\Users\caminstech\Deskto...\choosebox2.m 6 of 7 'cdata',larrow,... 'callback',{@doleft}); try set(fig, 'visible','on'); uiwait(fig); catch if ishandle(fig) delete(fig) if isappdata(0,'listdialogappdata') ad = getappdata(0,'listdialogappdata'); selection = ad.pos_right; value = ad.value; rmappdata(0,'listdialogappdata') % figure was deleted selection = []; value = 0; function dook(varargin) ad=getappdata(0,'listdialogappdata'); ad.value = 1; setappdata(0,'listdialogappdata',ad) delete(gcbf); function docancel(varargin) ad.value = 0; ad.pos_right = []; setappdata(0,'listdialogappdata',ad) delete(gcbf); function dofromboxclick(varargin) % if this is a doubleclick, dook if strcmp(get(gcbf,'selectiontype'),'open') doright; function dotoboxclick(varargin) % if this is a doubleclick, dook if strcmp(get(gcbf,'selectiontype'),'open') doleft; function doright(varargin) ad=getappdata(0,'listdialogappdata'); leftbox=findobj('tag','leftbox'); rightbox=findobj('tag','rightbox'); selection=get(leftbox,'value'); ad.pos_right=[ad.pos_right;ad.pos_left(selection)]; ad.tostring=[ad.tostring ad.fromstring(selection)];

5/09/17 16:46 C:\Users\caminstech\Deskto...\choosebox2.m 7 of 7 if ad.cmode==1 % remove selected items ad.pos_left(selection)=[]; ad.fromstring(selection)=[]; setappdata(0,'listdialogappdata',ad) set(leftbox,'string',ad.fromstring,'value',[]); set(rightbox,'string',ad.tostring,'value',[]); function doleft(varargin) ad=getappdata(0,'listdialogappdata'); leftbox=findobj('tag','leftbox'); rightbox=findobj('tag','rightbox'); selection=get(rightbox,'value'); if ad.cmode==1 % if selected items had been removed % Sort in the items from right hand side again for i=1:length(selection) next_item=min(find(ad.pos_left>ad.pos_right(selection(i)))); if isempty(next_item) % Inserting item is last one ad.pos_left(+1)=ad.pos_right(selection(i)); ad.fromstring(+1)=ad.tostring(selection(i)); if next_item==ad.pos_left(1) % Inserting item is first one ad.pos_left=[ad.pos_right(selection(i));ad.pos_left]; ad.fromstring=[ad.tostring(selection(i)) ad.fromstring]; % Inserting item is anywhere in the middle ad.pos_left=[ad.pos_left(1:next_item-1);ad.pos_right(selection(i));ad. pos_left(next_item:)]; ad.fromstring=[ad.fromstring(1:next_item-1) ad.tostring(selection(i)) ad. fromstring(next_item:)]; ad.pos_left=ad.pos_left(:); % Make sure it is a nx1-vector ad.pos_right(selection)=[]; ad.tostring(selection)=[]; setappdata(0,'listdialogappdata',ad) set(leftbox,'string',ad.fromstring,'value',[]); set(rightbox,'string',ad.tostring,'value',[]);

5/09/17 16:47 C:\Users\caminste...\CreateForcesVector2.m 1 of 1 function ForcesNames=CreateForcesVector2(nnodes) global ScreenOption ForcesNames=cell(6*nnodes,1); %--- Forces and force-pair variables for i=1:nnodes pos=6*i-5; ForcesNames{pos}=['Rx' sprintf('%04.0f',i)]; ForcesNames{pos+1}=['Ry' sprintf('%04.0f',i)]; ForcesNames{pos+2}=['Rz' sprintf('%04.0f',i)]; ForcesNames{pos+3}=['Mx' sprintf('%04.0f',i)]; ForcesNames{pos+4}=['My' sprintf('%04.0f',i)]; ForcesNames{pos+5}=['Mz' sprintf('%04.0f',i)]; %--- Plotting information if ScreenOption==1 fprintf('--- Initial vector of forces:\n') ForcesNames if ScreenOption==2 fprintf('%%--- Initial vector of forces:\n') fprintf('$$\\left(\\begin{array}{c}'); for i=1:length(forcesnames)-1 fprintf('%s \\\\ ',ForcesNames{i}); fprintf('%s \\{array}\\right)$$ \n\n',forcesnames{});

5/09/17 16:47 C:\Users\caminstec...\CreateGSMVarNames2.m 1 of 2 function [GSM,allGSMVarNames]=CreateGSMVarNames2(GSM0,nsize,nbeams,beams) global subbeamseaiziygjqizqiy global ScreenOption Symbway %--- create the complete list of variables varnames=['e' 'A' 'dx'; 'E' 'Iz' 'dx'; 'E' 'Iy' 'dx'; 'E' 'A' 'dy'; 'E' 'Iz' 'dy'; 'E' 'Iy' 'dy'; 'E' 'A' 'dz'; 'E' 'Iz' 'dz'; 'E' 'Iy' 'dz'; 'G' 'J' 'wx'; 'E' 'Iz' 'wx'; 'E' 'Iy' 'wx'; 'E' 'Iz' 'wy'; 'E' 'Iy' 'wy'; 'G' 'J' 'wy'; 'E' 'Iz' 'wz'; 'E' 'Iy' 'wz'; 'G' 'J' 'wz'; 'E' 'QIz' 'dx'; 'E' 'QIy' 'dx'; 'E' 'QIz' 'dy'; 'E' 'QIy' 'dy'; 'E' 'QIz' 'dz'; 'E' 'QIy' 'dz'; 'E' 'QIz' 'wx'; 'E' 'QIy' 'wx'; 'E' 'QIz' 'wy'; 'E' 'QIy' 'wy'; 'E' 'QIz' 'wz'; 'E' 'QIy' 'wz'] allgsmvarnames=cell(1,nsize); transformvar=[2 3 4 2 3 4 2 3 4 6 3 4 3 4 6 3 4 6 7 8 7 8 7 8 7 8 7 8 7 8]; cont=0; for beam=1:nbeams for beamextreme=1:2 beamnode=beams(beam,beamextreme); for k=1:30 %related to the dimension of transformvar cont=cont+1; allgsmvarnames{cont}=[allgsmvarnames{cont} varnames(k,1) sprintf('%04.0f', subbeamseaiziygjqizqiy{1}(beam)) varnames(k,2) sprintf('%04.0f',subbeamseaiziygjqizqiy {transformvar(k)}(beam)) varnames(k,3) sprintf('%04.0f',beamnode)]; %--- identify the non-sense variables for this example validcolumns=find(sum(abs(gsm0),1)~=0); %--- delete the non-sense columns GSM0=GSM0(:,validcolumns); GSMVarNames=allGSMVarNames(validcolumns); %--- get the equal columns togueter (deleting the repeat ones) allgsmvarnames=unique(gsmvarnames); [r,ni]=size(gsm0); if Symbway==0 GSM=zeros(r,length(allGSMVarNames)); GSM=sym(zeros(r,length(allGSMVarNames))); for i=1:length(allgsmvarnames) aux=[]; for j=1:length(gsmvarnames) if isequal(allgsmvarnames(i),gsmvarnames(j)); aux=[aux j]; GSM(:,i)=sum(GSM0(:,aux),2); %--- Plotting information if ScreenOption==1

5/09/17 16:47 C:\Users\caminstec...\CreateGSMVarNames2.m 2 of 2 fprintf('--- Initial GSM and variables:\n') GSM allgsmvarnames' if ScreenOption==2 fprintf('%%--- Initial GSM and variables:\n$$%s$$\n',latex(gsm)); % fprintf('$$\\left(\\begin{array}{c}'); for i=1:length(allgsmvarnames)-1 fprintf('%s \\\\ ',allgsmvarnames{i}); fprintf('%s \\{array}\\right)$$ \n\n',allgsmvarnames{});

5/09/17 16:47 C:\Users\caminstec...\CreateLSMVarNames2.m 1 of 1 function [GSM,GSMVarNames]=CreateLSMVarNames2(GSM0,nsize,nbeams,beams) global subbeamseaiziygjqizqiy global ScreenOption Symbway %--- create the complete list of variables varnames=['e' 'A' 'dx'; 'E' 'Iz' 'dx'; 'E' 'Iy' 'dx'; 'E' 'A' 'dy'; 'E' 'Iz' 'dy'; 'E' 'Iy' 'dy'; 'E' 'A' 'dz'; 'E' 'Iz' 'dz'; 'E' 'Iy' 'dz'; 'G' 'J' 'wx'; 'E' 'Iz' 'wx'; 'E' 'Iy' 'wx'; 'E' 'Iz' 'wy'; 'E' 'Iy' 'wy'; 'G' 'J' 'wy'; 'E' 'Iz' 'wz'; 'E' 'Iy' 'wz'; 'G' 'J' 'wz'; 'E' 'QIz' 'dx'; 'E' 'QIy' 'dx'; 'E' 'QIz' 'dy'; 'E' 'QIy' 'dy'; 'E' 'QIz' 'dz'; 'E' 'QIy' 'dz'; 'E' 'QIz' 'wx'; 'E' 'QIy' 'wx'; 'E' 'QIz' 'wy'; 'E' 'QIy' 'wy'; 'E' 'QIz' 'wz'; 'E' 'QIy' 'wz']; allgsmvarnames=cell(1,nsize); transformvar=[2 3 4 2 3 4 2 3 4 6 3 4 3 4 6 3 4 6 7 8 7 8 7 8 7 8 7 8 7 8]; cont=0; for beam=1:nbeams for beamextreme=1:2 beamnode=beams(beam,beamextreme); for k=1:30 % related to the dimension of varnames cont=cont+1; allgsmvarnames{cont}=[allgsmvarnames{cont} varnames(k,1) sprintf('%04.0f', subbeamseaiziygjqizqiy{1}(beam)) varnames(k,2) sprintf('%04.0f',subbeamseaiziygjqizqiy {transformvar(k)}(beam)) varnames(k,3) sprintf('%04.0f',beamnode)]; %--- identify the non-sense variables for this example validcolumns=find(sum(abs(gsm0),1)~=0);

5/09/17 16:47 C:\Users\caminstech\Deskto...\CreateZpd2.m 1 of 1 function [zpd,zpd_vector,zpd_matrix]=createzpd2(binv,d) % Particular solution associated with zd in matritial form global ScreenOption %--- Delete the null terms in d and in BInv validcol=find(d~=0); zpd_vector=d(validcol); %vector of forces % if Symbway==1 zpd_matrix=sym(binv); %matrix of coefficients %--- Compute the vector zpd zpd=zpd_matrix*zpd_vector; % % zpd_matrix=binv(:,validcol); %matrix of coefficients % zpd_aux=ones(size(zpd_vector)); % zpd=zpd_matrix*zpd_aux; % %--- Plotting information if ScreenOption==1 fprintf('--- zpd= zpd_matrix * zpd_vector:\n') zpd,zpd_matrix,zpd_vector if ScreenOption==2 fprintf('\n%%--- zpd= zpd_matrix * zpd_vector:\n'); fprintf('zpd: $$%s$$\n',latex(zpd)); fprintf('zpd matrix: $$%s$$\n',latex(zpd_matrix)); fprintf('zpd vector: $$%s$$\n\n',latex(zpd_vector));

5/09/17 16:47 C:\Users\caminstech\De...\Displacements2.m 1 of 4 function [KnownName,valuevars]=Displacements2(ForcesNames,nnodes,nbeams) global knowndxdydzwxwywz knowneaiziygjqizqiy knowneaeizeiygjeqizeqiy global valuedxdydzwxwywz valueeaiziygjqizqiy valueeaeizeiygjeqizeqiy global ScreenOption global subbeamseaiziygjqizqiy beamlength global direct knowneaiziygjsdirect valueeaiziygjsdirect % %--- Poisson % v=0.25; KnownName=cell(1,6*nnodes); valuevars=sym([]); ind=1; % %--- Create forces as symbolic variables % for i=1:nnodes % eval(sprintf('syms H%04.0f',i)) % eval(sprintf('syms V%04.0f',i)) % eval(sprintf('syms M%04.0f',i)) % %--- Displacements & forces [r c]=size(knowndxdydzwxwywz); auxvar='dxdydzwxwywz'; for node=1:nnodes for j=1:6 pos=find(node==knowndxdydzwxwywz{j,:}); % if ~isempty(pos) && valuedxdydzwxwywz{j}(pos)==0 KnownName{ind}=sprintf('%s%04.0f',auxvar(j),node); valuevars=[valuevars valuedxdydzwxwywz{j}(pos)]; % % KnownName(ind)=ForcesNames(6*(node-1)+j); % valuevars=[valuevars KnownName(ind)]; % ind=ind+1; % %--- Individual E,A,I % if direct==1 % transformdata={[1:16]; [1 3 9 11]; [2 4 5 10 12 13]; [6 7 8 14 15 16]}; % auxvar='eaiq'; % for beam=1:nbeams % for k=1:4 % type=subbeamseaiqi{k}(beam); % pos=find(type==knowneaisdirect{k}); % if pos>0 % for r=transformdata{k} % KnownName{ind}=sprintf('%s%04.0f',auxvar(k),knownEAISdirect{k} (pos)); % valuevars=[valuevars valueeaisdirect{k}(pos)]; % ind=ind+1; %

5/09/17 16:47 C:\Users\caminstech\De...\Displacements2.m 2 of 4 % % % % % transformdata={[1:16]; [1 3 9 11]; [2 4 5 10 12 13]; [6 7 8 14 15 16]}; % auxvar='eaiq'; % for beam=1:nbeams % for k=1:4 % type=subbeamseaiqi{k}(beam); % pos=find(type==knowneaiqi{k}); % if pos>0 % for r=transformdata{k} % KnownName{ind}=sprintf('%s%04.0f',auxvar(k),knownEAIQI{k}(pos)); % valuevars=[valuevars valueeaiqi{k}(pos)]; % ind=ind+1; % % % % % % % %--- Pairs EA and EI % auxvar='aeeieq'; % for beam=1:nbeams % for k=1:3 % pos=find(beam==knowneaeieqi{k}); % if pos>0 % for r=transformdata{k+1} % KnownName{ind}=sprintf('%s%04.0f%s%04.0f',auxvar(2*k-1),knownEAEIEQI {k}(pos),auxvar(2*k),knowneaeieqi{k}(pos)); % valuevars=[valuevars valueeaeieqi{k}(pos)]; % ind=ind+1; % % % % % % %--- Delete the empty cells % KnownName=KnownName(1:ind-1); % valuevars=valuevars(1:ind-1); % % %--- Sort and check the solution % [KnownName,ind]=sort(KnownName); % valuevars=valuevars(ind); % % [KnownName1,pos0,pos]=unique(KnownName); % valuevars1=valuevars(pos0); % % if direct==1 % cont1=1; % cont2=1; % cont3=1; % for i=1:length(knownname1) % aux1=char(knownname1(i)); % auxl=aux1(1:1);

5/09/17 16:47 C:\Users\caminstech\De...\Displacements2.m 3 of 4 % auxn=str2double(aux1(2:)); % if auxl=='e' % auxe(cont1)=auxn; % valuee(cont1)=valuevars1(i); % cont1=cont1+1; % % if auxl=='i' % auxi(cont2)=auxn; % valuei(cont2)=valuevars1(i); % cont2=cont2+1; % % if auxl=='q' % auxq(cont3)=auxn; % valueq(cont3)=valuevars1(i); % cont3=cont3+1; % % % % for i=1:length(subbeamseaiqi{1}) % auxl=beamlength(i); % sube=subbeamseaiqi{1}(i); % subi=subbeamseaiqi{3}(i); % subq=subbeamseaiqi{4}(i); % for j=1:length(auxe) % if auxe(j)==sube % vale=valuee(j); % % % for j=1:length(auxi) % if auxi(j)==subi % vali=valuei(j); % % % for j=1:length(auxq) % if auxq(j)==subq % valq=valueq(j); % % % if valq==0 % Q(i)=sym(0); % % Q(i)=valI*((12*valE*valI)/((valE/(2+2*v))*valQ*auxl^2))/(1+ ((12*valE*valI)/((valE/(2+2*v))*valQ*auxl^2))); % % % L=1; % Q=sym(eval(Q)); % cont1=1; % for i=1:length(knownname1) % aux1=char(knownname1(i)); % auxl=aux1(1:1); % if auxl=='q' % valuevars1(i)=q(cont1); % cont1=cont1+1; %

5/09/17 16:47 C:\Users\caminstech\De...\Displacements2.m 4 of 4 % % % % %--- Plotting information % if ScreenOption==1 % fprintf('--- Initial known forces and boundary conditions:\n') % for i=1:length(valuevars1) % fprintf('%s: %s\n',knownname1{i},char(valuevars1(i))) % % fprintf('\n') % if ScreenOption==2 % fprintf('%%--- Initial known forces and boundary conditions:\n') % fprintf('\\begin{tabular}{llllllll}\n'); % ncol=8; % for i=1:ceil(length(valuevars1)/ncol)*ncol % if i<=length(valuevars1) % fprintf('%s=%s',knownname1{i},char(valuevars1(i))); % % if floor(i/ncol)==i/ncol && i<length(valuevars1) % fprintf('\\\\ \n'); % if floor(i/ncol)==i/ncol && i==ceil(length(valuevars1)/ncol)*ncol % fprintf(' \n'); % % fprintf(' & '); % % % fprintf('\\{tabular}\n\n') %

5/09/17 16:47 C:\Users\caminstech\Deskt...\EQSolution2.m 1 of 1 function Val=EQSolution2 Val=[];

5/09/17 16:48 C:\Users\caminstech\Deskt...\EvalNumRes2.m 1 of 2 function U_num=EvalNumRes2(SelEq,Niter,Cumvars,Cumres) %Evaluate values numerically global ScreenOption global measur_values loads_value U_num=zeros(length(Cumvars),1); groupeq=sum(seleq>0,2); %# of equations per iteration eq=1; Vars=[]; for i=1:niter %--- Identifies the symbolic variables for j=1:groupeq(i) auxvars=symvar(cumres(eq+j-1)); NewVars=setdiff(auxvars,Vars); %--- Data identification n=length(newvars); NumVal=zeros(1,n); if n>0 for j=1:n % search in measurements [c,ni,pos]=intersect(newvars(j),measur_values(:,1)); if ~isempty(c) NumVal(j)=measur_values{pos,2}; % search in loads [c,ni,pos]=intersect(newvars(j),loads_value(:,1)); if ~isempty(c)&& ~isempty(loads_value{pos,2}) NumVal(j)=loads_value{pos,2}; % b)evalue the introduced data for j=1:n eval(sprintf('%s=%d;',char(newvars(j)),numval(j))); %--- Evaluate the equations per iteration U_num(eq:eq+groupeq(i)-1)=eval(Cumres(eq:eq+groupeq(i)-1)); %--- Add the new values to the symbolic variables for j=1:groupeq(i) Vars=unique([Vars NewVars Cumvars(eq:eq+groupeq(i)-1)']); eval(sprintf('%s=%d;',char(cumvars(j+eq-1)),u_num(j+eq-1))) %--- Next equations eq=eq+groupeq(i);

5/09/17 16:48 C:\Users\caminstech\Deskt...\EvalNumRes2.m 2 of 2 %--- Plotting information switch ScreenOption case {0,1} fprintf('\n--- Numeric observed values\n') for i=1:length(u_num) fprintf('%s = %d\n', Cumvars{i},U_num(i)) case 2 fprintf('%%--- Numeric observed values\n') % Numeric results fprintf('\\begin{tabular}{llllllll}\n'); ncol=4; for i=1:ceil(length(u_num)/ncol)*ncol if i<=length(u_num) fprintf('%s=%-8.2f',cumvars{i},u_num(i)); if floor(i/ncol)==i/ncol && i<length(u_num) fprintf('\\\\ \n'); if floor(i/ncol)==i/ncol && i==ceil(length(u_num)/ncol)*ncol fprintf(' \n'); fprintf(' & '); fprintf('\\{tabular}\n\n')

5/09/17 16:48 C:\Users\caminstech\Desktop\...\EvalRes2.m 1 of 2 function [Cumvars,Cumres]=EvalRes2(D,zk,zd,zpd_vector,zpd_matrix,SelEq,Niter,Measured) % NUMERIC CALCULUS global ScreenOption global measur_values loads_value %--- Final solution Cumvars={}; Cumres=[]; %--- Data query Vars=[zpd_vector;Measured]; n=length(vars); NumVars=zeros(1,n); %--- Data identification if n>0 for j=1:n % search in measurements [c,ni,pos]=intersect(char(vars(j)),measur_values(:,1)); if ~isempty(c) NumVars(j)=measur_values{pos,2}; % search in loads [c,ni,pos]=intersect(char(vars(j)),loads_value(:,1)); if ~isempty(c)&& ~isempty(loads_value{pos,2}) NumVars(j)=loads_value{pos,2}; %--- Iterative process to find the observed variables for i=1:niter SelEq_i=SelEq(i,SelEq(i,:)>0); %delete the null values [Var,Val]=StiffnessCalculus2(D,zk,zd,zpd_vector,zpd_matrix,SelEq_i,Measured,Vars, NumVars); Measured=[Measured; Var]; Vars=[Vars; Var]; NumVars=[NumVars, Val]; %--- Cumulate the results Cumvars=[Cumvars; Var]; Cumres=[Cumres, Val]; %--- Plotting information switch ScreenOption case {0,1} fprintf('\n--- Numeric observed variables\n') for i=1:length(cumres) fprintf('%s = %d\n', Cumvars{i},Cumres(i)) case 2 fprintf('%%--- Numeric observed variables\n')

5/09/17 16:48 C:\Users\caminstech\Desktop\...\EvalRes2.m 2 of 2 % Numeric results fprintf('$$\\left(\\begin{array}{c}'); for i=1:length(cumvars)-1 fprintf('%s \\\\ ',Cumvars{i}); fprintf('%s \\{array}\\right)= \n',cumvars{}); % Cumres digits(3) fprintf('%s$$\n\n',latex(sym(cumres,'d')));

5/09/17 16:48 C:\Users\caminstech\Deskt...\EvalSymRes2.m 1 of 1 function [Cumvars,Cumres]=EvalSymRes2(D,zk,zd,zpd_vector,zpd_matrix,SelEq,Niter, Measured) global ScreenOption %--- Final solution: Cumvars=Cumres1*Us_sym_vector+Cumres2 Cumvars={}; Cumres1={}; Cumres2={}; %indepent term %--- Iterative process to find the observed variables Knowns=Measured'; for i=1:niter SelEq_i=SelEq(i,SelEq(i,:)>0); %delete the null values [unique_x,us_sym_matrix,us_sym_vector,it_sym]=stiffnesssymcalculus2(d,zk,zd, zpd_vector,zpd_matrix,seleq_i,knowns); Knowns=[Knowns,unique_x]; %--- Cumulate the results Cumvars=[Cumvars; unique_x']; Cumres1=[Cumres1; Us_sym_matrix]; Cumres2=[Cumres2; IT_sym]; Cumres=Cumres1*Us_sym_vector+Cumres2; %--- Plotting information switch ScreenOption case {0,1} fprintf('\n--- Symbolic observed variables: Cumvars=Cumres1*Us_sym_vector+Cumres2\n') Cumvars,Cumres1,Us_sym_vector,Cumres2 case 2 fprintf('%%--- Symbolic observed variables\n') % Symbolic results fprintf('$$\\left(\\begin{array}{c}'); for i=1:length(cumvars)-1 fprintf('%s \\\\ ',Cumvars{i}); fprintf('%s \\{array}\\right)= \n',cumvars{}); % Cumres1 fprintf('%s\n',latex(cumres1)); % Cumres2 fprintf('%s + \n',latex(cumres2)); % IT_sym if any(it_sym~=0)==0 fprintf('$$\n'); fprintf('%s$$\n\n',latex(it_sym));

5/09/17 16:48 C:\Users\caminstech\D...\FullRankMatrix2.m 1 of 2 function [FullRMatrix,rankM,selectedr,selectedc]=FullRankMatrix2(A,error) %Determine a submatrix of A with full rank [r,c]=size(a); tol=error^.5; targrank=rank(a,tol); %--- Work with the matrix A such as r<=c. Transpose if it is necessary if r>c M=A'; aux=r; r=c; c=aux; M=A; %--- Identify the L.I. rows if targrank==r selectedr=1:r; i=0; while 1 i=i+1; if sum(abs(m(i,:)),2)>error i==r break selectedr=i; optr=setdiff(1:r,selectedr); for i=optr if rank(m([selectedr,i],:),tol)==length(selectedr)+1 selectedr=[selectedr,i]; if length(selectedr)==targrank %when the maximum rank is reached, it stops break %--- Identify the L.I. columns (add one by one until completing tthe rank) if targrank==c selectedc=1:c; M=M(selectedr,:); i=0; while 1 i=i+1; if sum(abs(m(:,i)),1)>error i==c break selectedc=i; optc=setdiff(1:c,selectedc); for i=optc

5/09/17 16:48 C:\Users\caminstech\D...\FullRankMatrix2.m 2 of 2 if rank(m(:,[selectedc,i]),tol)==length(selectedc)+1 selectedc=[selectedc,i]; if length(selectedc)==targrank %when the maximum rank is reached, it stops break %--- Check the full rank and correct it if it is necessary % (delete one by one the non-useful columns) if rank(m(:,selectedc),tol)<targrank fprintf('recalculating the full-rank matrix...\n') selectedc=1:c; for i=1:c temp_selectedc=setdiff(selectedc,i); if rank(m(:,temp_selectedc),tol)==targrank selectedc=temp_selectedc; %--- Solution FullRMatrix=M(:,selectedc); if r>c %transpose the solution FullRMatrix=FullRMatrix'; aux=selectedr; selectedr=selectedc; selectedc=aux; rankm=rank(fullrmatrix,tol);

5/09/17 16:49 C:\Users\caminstech\De...\Identif_J1_J22.m 1 of 3 function [mat_1,mat_2,mat_3,b_sorted,z_sorted,nf0,ndouble,nsingle,varsingle,vardouble, varf0]=identif_j1_j22(b_ampl,z,neq) % Identification of J1 and J2 \ % Restriction I001w001=(I001)*(w001) is expressed as % [mat_1]x = ([mat_2]x).* ([mat_3]x) % [omega I omega]x = ([omega omega J1]X).* ([omega omega J2]X), being % X=[epsilon; vardouble; varsingle_expanded] % 1)Sort z; z_sorted=[h;v;m; vardouble; varsingle]=[f0, D00; D0] lenz=length(z); new_pos=zeros(lenz,1); % identify F0 z_aux=z; cont=1; for i=1:lenz auxvar=z_aux{i}; if ~isempty(strfind(auxvar,'rx')); new_pos(cont)=i; cont=cont+1; varf0{cont-1}=z_aux{i}; z_aux{i}=''; %delete the identified values for i=1:lenz auxvar=z{i}; if ~isempty(strfind(auxvar,'ry')); new_pos(cont)=i; cont=cont+1; varf0{cont-1}=z_aux{i}; z_aux{i}=''; %delete the identified values for i=1:lenz auxvar=z_aux{i}; if ~isempty(strfind(auxvar,'rz')); new_pos(cont)=i; cont=cont+1; varf0{cont-1}=z_aux{i}; z_aux{i}=''; %delete the identified values for i=1:lenz auxvar=z_aux{i}; if ~isempty(strfind(auxvar,'mx')); new_pos(cont)=i; cont=cont+1; varf0{cont-1}=z_aux{i}; z_aux{i}=''; %delete the identified values

5/09/17 16:49 C:\Users\caminstech\De...\Identif_J1_J22.m 2 of 3 for i=1:lenz auxvar=z_aux{i}; if ~isempty(strfind(auxvar,'my')); new_pos(cont)=i; cont=cont+1; varf0{cont-1}=z_aux{i}; z_aux{i}=''; %delete the identified values for i=1:lenz auxvar=z_aux{i}; if ~isempty(strfind(auxvar,'mz')); new_pos(cont)=i; cont=cont+1; varf0{cont-1}=z_aux{i}; z_aux{i}=''; %delete the identified values nf0=cont-1; %number of Reactions=[Rx,Ry,Rz,Mx,My,Mz] if cont==1 varf0={' '}; % identify double unknown for i=1:lenz auxvar=z_aux{i}; if length(auxvar)==10 %double unknown (be aware with the dynamic case and shear) new_pos(cont)=i; cont=cont+1; z_aux{i}=''; %delete the identified values ndouble=cont-1-nf0; %number of double variables % identify single unknown for i=1:lenz auxvar=z_aux{i}; if length(auxvar)==5 %single unknown (be aware with the dynamic case) new_pos(cont)=i; cont=cont+1; nsingle=cont-1-ndouble-nf0; %number of single variables % sort z and B B_sorted=B_ampl(:,new_pos); z_sorted=z(new_pos);

5/09/17 16:49 C:\Users\caminstech\De...\Identif_J1_J22.m 3 of 3 %--- Add single unknown lacking vardouble=z_sorted(nf0+1:nf0+ndouble); varsingle=z_sorted(nf0+ndouble+1:nf0+ndouble+nsingle); for i=1:ndouble aux1=vardouble{i}(1:5); %i.e. I0001 %try to find if it is already included if isempty(cell2mat(strfind(varsingle,aux1))) ;%if empty, add the var varsingle=[varsingle,{aux1}]; nsingle=nsingle+1; aux2=vardouble{i}(6:10); %i.e. w0001 %try to find if it is already included if isempty(cell2mat(strfind(varsingle,aux2))) ;%if empty, add the var varsingle=[varsingle,{aux2}]; nsingle=nsingle+1; % Identify J1 and J2 J1=zeros(ndouble,nsingle); J2=zeros(ndouble,nsingle); for i=1:ndouble aux1=vardouble{i}(1:5); %i.e. I0001 aux2=vardouble{i}(6:); %i.e. w0001 for j=1:nsingle %search within the single variable vector if strfind(aux1,varsingle{j}); J1(i,j)=1; if strfind(aux2,varsingle{j}); J2(i,j)=1; % Arrange matrices mat_1, mat_2 and mat_3 % number of row= number of double variables mat_1=[zeros(ndouble,neq+nf0), eye(ndouble), zeros(ndouble,nsingle)]; mat_2=[zeros(ndouble,neq+nf0+ndouble), J1]; mat_3=[zeros(ndouble,neq+nf0+ndouble), J2];

5/09/17 16:49 C:\Users\caminstec...\LocalMatrixValues2.m 1 of 3 function [GSM,GSMVarsNames,KnownForces,KnownForcesValues]=LocalMatrixValues2(GSM0, GSMVarsNames,ForcesNames,KnownName,valuevars) global ScreenOption Symbway %--- VECTOR OF FORCES %--- a) Identify the known forces KnownForces=zeros(length(ForcesNames),1); KnownForcesValues=sym(zeros(length(ForcesNames),1)); KnownForcesname=cell(length(ForcesNames),1); typeknown=zeros(size(knownname)); for i=1:length(forcesnames) for j=1:length(knownname) if isequal(forcesnames{i},knownname{j}) KnownForces(i)=i; KnownForcesValues(i)=valuevars(j); KnownForcesname(i)=KnownName(j); typeknown(j)=1; break %--- E or G variable: delete from the list when it is known lengthgsmvars=length(gsmvarsnames); factor=ones(1,lengthgsmvars); for i=1:length(knownname) aux=knownname{i}; if strcmp('e',aux(1)) strcmp('g',aux(1)) typeknown(i)=2; EGvar=KnownName{i}; for j=1:lengthgsmvars auxvar=gsmvarsnames{j}; pos=strfind(auxvar,egvar); if ~isempty(pos) GSMVarsNames{j}=auxvar(setdiff(1:29,pos:pos+4)); factor(j)=factor(j)*valuevars(i); %--- A, Iz, Iy or J variable: delete from the list when it is known nulcol=[]; for i=1:length(knownname) aux=knownname{i}; if strcmp('a',aux(1)) strcmp('iz',aux(1)) strcmp('iy',aux(1)) strcmp('j',aux (1)) typeknown(i)=3; AIJvar=KnownName{i}; for j=1:lengthgsmvars auxvar=gsmvarsnames{j}; pos=strfind(auxvar,aijvar); if ~isempty(pos) len=length(gsmvarsnames{j});

5/09/17 16:49 C:\Users\caminstec...\LocalMatrixValues2.m 2 of 3 if valuevars(i)~=0 GSMVarsNames{j}=auxvar(setdiff(1:len,pos:pos+4)); GSMVarsNames{j}=''; nulcol=[nulcol,j]; factor(j)=factor(j)*valuevars(i); %--- QIz variable: delete from the list when it is known for i=1:length(knownname) aux=knownname{i}; if strcmp('qiz',aux(1)) typeknown(i)=4; QIzvar=KnownName{i}; for j=1:lengthgsmvars auxvar=gsmvarsnames{j}; pos=strfind(auxvar,qizvar); if ~isempty(pos) len=length(gsmvarsnames{j}); if valuevars(i)~=0 GSMVarsNames{j}=auxvar(setdiff(1:len,pos:pos+4)); GSMVarsNames{j}=''; nulcol=[nulcol,j]; factor(j)=factor(j)*valuevars(i); %--- QIy variable: delete from the list when it is known for i=1:length(knownname) aux=knownname{i}; if strcmp('qiy',aux(1)) typeknown(i)=5; QIyvar=KnownName{i}; for j=1:lengthgsmvars auxvar=gsmvarsnames{j}; pos=strfind(auxvar,qiyvar); if ~isempty(pos) len=length(gsmvarsnames{j}); if valuevars(i)~=0 GSMVarsNames{j}=auxvar(setdiff(1:len,pos:pos+4)); GSMVarsNames{j}=''; nulcol=[nulcol,j]; factor(j)=factor(j)*valuevars(i);

5/09/17 16:49 C:\Users\caminstec...\LocalMatrixValues2.m 3 of 3 %--- Multiply by the factor associated with the E, A, Iz, Iy, G, J and Q for i=1:lengthgsmvars GSM1(:,i)=GSM0(:,i)*factor(i); %--- identify null columns in GSM and delete variable and column validcolumns=find(sum(abs(gsm1),1)~=0); GSM1=GSM1(:,validcolumns); GSMVarsNames=GSMVarsNames(validcolumns); % --- get the equal columns together (deleting the repeated ones) allgsmvarsnames=unique(gsmvarsnames,'stable'); [r,ni]=size(gsm1); if Symbway==0 GSM=zeros(r,length(allGSMVarsNames)); GSM=sym(zeros(r,length(allGSMVarsNames))); for i=1:length(allgsmvarsnames) aux=[]; for j=1:length(gsmvarsnames) if isequal(allgsmvarsnames(i),gsmvarsnames(j)); aux=[aux j]; GSM(:,i)=sum(GSM1(:,aux),2);

5/09/17 16:49 C:\Users\caminstech\Des...\MinimLeastSq2.m 1 of 4 function [X_sol,nepsilon,fval,z_sorted]=MinimLeastSq2(B_ampl, z, d_ampl, Wi) %Wi; weigths %B_ampl=[B;Eq.Equilibrium] %d_ampl=[d;cond.equilbrium] %--- Optimizacion NO lineal %Solving B*z=d+epsilon subject to equilibrium eq., relation between single %and double variables [neq_ampl,~]=size(b_ampl); neq=neq_ampl-3; %The output will be the minimum error associated with the equations and the unknown variables [mat_1,mat_2,mat_3,b_amplsorted,z_sorted,nf0,ndouble,nsingle]=identif_j1_j2(b_ampl,z, neq); % Identification of J1 and J2 nunknown=nf0+ndouble+nsingle; %to define the number of errors to minimize (an error per equation, i.e., an error per variable) objfun = @(X)(Wi.*(X(1:neq)) ^2); %neq de X0=[zeros(neq,1);ones(nunknown,1)]; A=[];b=[]; % A x <= b Aeq=[[-eye(neq);zeros(3,neq)], B_amplsorted, zeros(neq+3,nunknown-neq)]; beq=d_ampl; % Aeq x = beq lb=[-0.01*ones(neq,1);0.25*ones(nunknown,1)]; ub=[0.01*ones(neq,1);1.75*ones(nunknown,1)]; %options=optimset('algorithm','interior-point','display','off'); %matlab viejo options=optimoptions('fmincon','algorithm','sqp','display','on'); [X_sol,fval,exitflag,output]=fmincon(objfun,X0,A,b,Aeq,beq,lb,ub,@nonlcon,options); nepsilon=neq; %--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- function [c, ceq]=nonlcon(x) c=[]; %Nonlinear inequality constraints ceq=(mat_1*x)-(mat_2*x).*(mat_3*x); %=0 function [mat_1,mat_2,mat_3,b_sorted,z_sorted,nf0,ndouble,nsingle]=identif_j1_j2(b,z, neq) % Identification of J1 and J2 \ % Restriction I001w001=(I001)*(w001) is expressed as % [mat_1]x = ([mat_2]x).* ([mat_3]x) % [omega I omega]x = ([omega omega J1]X).* ([omega omega J2]X), being % X=[epsilon; vardouble; varsingle_expanded] % 1)Sort z; z_sorted=[h;v;m; vardouble; varsingle]=[f0, D00; D0] lenz=length(z); new_pos=zeros(lenz,1); % identify F0 z_aux=z;

5/09/17 16:49 C:\Users\caminstech\Des...\MinimLeastSq2.m 2 of 4 cont=1; for i=1:lenz auxvar=z_aux{i}; if ~isempty(strfind(auxvar,'rx')) new_pos(cont)=i; cont=cont+1; z_aux{i}=''; %delete the identified values for i=1:lenz auxvar=z{i}; if ~isempty(strfind(auxvar,'ry')) new_pos(cont)=i; cont=cont+1; z_aux{i}=''; %delete the identified values for i=1:lenz auxvar=z_aux{i}; if ~isempty(strfind(auxvar,'rz')) new_pos(cont)=i; cont=cont+1; z_aux{i}=''; %delete the identified values for i=1:lenz auxvar=z_aux{i}; if ~isempty(strfind(auxvar,'mx')) new_pos(cont)=i; cont=cont+1; z_aux{i}=''; %delete the identified values for i=1:lenz auxvar=z_aux{i}; if ~isempty(strfind(auxvar,'my')) new_pos(cont)=i; cont=cont+1; z_aux{i}=''; %delete the identified values for i=1:lenz auxvar=z_aux{i}; if ~isempty(strfind(auxvar,'mz')) new_pos(cont)=i; cont=cont+1; z_aux{i}=''; %delete the identified values nf0=cont-1; %number of Reactions=[Rx,Ry,Rz,Mx,My,Mz] % identify double unknown for i=1:lenz auxvar=z_aux{i}; if ~isempty(length(auxvar)==8) %double unknown (be aware with the dynamic case and

5/09/17 16:49 C:\Users\caminstech\Des...\MinimLeastSq2.m 3 of 4 shear) new_pos(cont)=i; cont=cont+1; z_aux{i}=''; %delete the identified values ndouble=cont-1-nf0; %number of double variables % identify single unknown for i=1:lenz auxvar=z_aux{i}; if ~isempty(length(auxvar)==4) %single unknown (be aware with the dynamic case) new_pos(cont)=i; cont=cont+1; nsingle=cont-1-ndouble-nf0; %number of single variables % sort z and B B_sorted=B(:,new_pos); z_sorted=z(new_pos); %--- Add single unknown lacking vardouble=z_sorted(nf0+1:nf0+ndouble); varsingle=z_sorted(nf0+ndouble+1:nf0+ndouble+nsingle); for i=1:ndouble aux1=vardouble{i}(1:4); %i.e. I0001 %try to find if it is already included if isempty(cell2mat(strfind(varsingle,aux1))) %if empty, add the var varsingle=[varsingle,{aux1}]; nsingle=nsingle+1; aux2=vardouble{i}(5:); %i.e. w0001 %try to find if it is already included if isempty(cell2mat(strfind(varsingle,aux2))) %if empty, add the var varsingle=[varsingle,{aux2}]; nsingle=nsingle+1; % Identify J1 and J2 J1=zeros(ndouble,nsingle); J2=zeros(ndouble,nsingle); for i=1:ndouble aux1=vardouble{i}(1:4); %i.e. I0001 aux2=vardouble{i}(5:); %i.e. w0001 for j=1:nsingle %search within the single variable vector if strfind(aux1,varsingle{j}) J1(i,j)=1; strfind(aux2,varsingle{j}) J2(i,j)=1;

5/09/17 16:49 C:\Users\caminstech\Des...\MinimLeastSq2.m 4 of 4 % Arrange matrices mat_1, mat_2 and mat_3 % number of row= number of double variables mat_1=[zeros(ndouble,neq+nf0), eye(ndouble), zeros(ndouble,nsingle)]; mat_2=[zeros(ndouble,neq+nf0+double), J1]; mat_3=[zeros(ndouble,neq+nf0+double), J2];

5/09/17 16:49 C:\Users\caminstech\Desk...\PlotNetwork2.m 1 of 7 function PlotNetwork2(Example,beams,nodecoordinates,nnodes,nbeams,theta,h) % Plot the Network, drawing some selected links in red global knowndxdydzwxwywz global valuedxdydzwxwywz global knownfxfyfzmxmymz global valuefxfyfzmxmymz global subbeamseaiziygjqizqiy % Transformation from symbolic to numeric L=1; nodecoordinates=eval(nodecoordinates); % graphical configuration %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % h=figure('name','network'); colors=gencolor(nbeams); xmax=max(nodecoordinates(:,1)); xmin=min(nodecoordinates(:,1)); ymax=max(nodecoordinates(:,2)); ymin=min(nodecoordinates(:,2)); %zmax=max(nodecoordinates(:,3)); %zmin=min(nodecoordinates(:,3)); PS=max(xmax-xmin,ymax-ymin); %Plot size R=max(0.1,PS/210); lettersize=10; hold(h,'on') axis(h,'square','off') % Beams %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% for b=1:nbeams dx(1)=nodecoordinates(beams(b,1),1); dx(2)=nodecoordinates(beams(b,2),1); dy(1)=nodecoordinates(beams(b,1),2); dy(2)=nodecoordinates(beams(b,2),2); dz(1)=nodecoordinates(beams(b,1),3); dz(2)=nodecoordinates(beams(b,2),3); color=zeros(1,3); for k=1:3 color(k)=colors(subbeamseaiziygjqizqiy{k}(b),k); plot3(h,dx,dy,dz,'-b','color',color,'linewidth',4) hold(h,'on') % Nodes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% for i=1:nnodes plot_circ(r,nodecoordinates(i,1),nodecoordinates(i,2),0,20,2) % Labels %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

5/09/17 16:49 C:\Users\caminstech\Desk...\PlotNetwork2.m 2 of 7 %- Beams labels for b=1:nbeams Labels(nodecoordinates(beams(b,1),:),nodecoordinates(beams(b,2),:),-R,num2str(b), lettersize*.8,'normal') %- Nodes labels for n=1:nnodes Labels(nodecoordinates(n,:),nodecoordinates(n,:),2*R,num2str(n),lettersize,'bold') % Supports %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% for n=1:nnodes type=0; for k=1:6 loc=find(knowndxdydzwxwywz{k}==n); if ~isempty(loc) if valuedxdydzwxwywz{k}(loc)==0 type=type+10^(6-k); type=type+7^(k); ang=0; % fprintf('node: %2.0f type: %6.4f \n', n, type) switch type case {10,17,353,360}, roller(nodecoordinates(n,1),nodecoordinates(n,2), nodecoordinates(n,3),ang,r) case {11,18}, rollerfixed(nodecoordinates(n,1),nodecoordinates(n,2), nodecoordinates(n,3),ang,r) case {100,149,443,492}, % if isempty(find(beams(:,1)==n)) % implies a tail node % aux=find(beams(:,2)==n); % beta=theta(aux(1))-pi/2; % roller(nodecoordinates(n,1),nodecoordinates(n,2),nodecoordinates(n,3),angpi/2,r) case {101,150}, rollerfixed(nodecoordinates(n,1),nodecoordinates(n,2),nodecoordinates(n, 3),ang-pi/2,R) case {110,453}, hinged(nodecoordinates(n,1),nodecoordinates(n,2), nodecoordinates(n,3),ang,r) case 111, if ~isempty(find(beams(:,1)==n)) % implies a head node aux=find(beams(:,1)==n); ang=theta(aux(1)); fixed(nodecoordinates(n,1),nodecoordinates(n,2),nodecoordinates(n,3),angpi/2,r) % Annotation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

5/09/17 16:49 C:\Users\caminstech\Desk...\PlotNetwork2.m 3 of 7 x=union(nodecoordinates(:,1),nodecoordinates(:,1)); y=union(nodecoordinates(:,2),nodecoordinates(:,2)); z=union(nodecoordinates(:,3),nodecoordinates(:,3)); nx=length(x); ny=length(y); nz=length(z); distx=max(abs(x()-x(1))/15,10*r); disty=max(abs(y()-y(1))/15,10*r); distz=max(abs(z()-z(1))/15,10*r); color=[.2.2.2]; if nx>1 annot=x(2:)-x(1:-1); yann=y(1)-disty; zann=z(1)-distz; plot3(h,[x(1)-distx/5; x; x()+distx/5],yann*ones(nx+2,1),zann*ones(nx+2,1),'- b','color',color,'linewidth',.5) for i=1:nx Cross(x(i),yann,zann,2*R,0,color) for i=1:nx-1 Labels([x(i) yann],[x(i+1) yann],r,num2str(annot(i),'%4.2f'),lettersize*. 8,'light') if ny>1 annot=y(2:)-y(1:-1); xann=x()+distx; zann=z()+distz; plot(h,xann*ones(ny+2,1),[y(1)-disty/5;y;y()+disty/5],'-b','color', color,'linewidth',.5) for i=1:ny Cross(xann,y(i),2*R,-pi/2,color) for i=1:ny-1 Labels([xann y(i)],[xann y(i+1)],r,num2str(annot(i),'%4.2f'),lettersize*. 8,'light') if nz>1 annot=z(2:)-z(1:-1); xann=x()+distx; plot(h,xann*ones(ny+2,1),[y(1)-disty/5;y;y()+disty/5],'-b','color', color,'linewidth',.5) for i=1:ny Cross(xann,y(i),2*R,-pi/2,color) for i=1:ny-1 Labels([xann y(i)],[xann y(i+1)],r,num2str(annot(i),'%4.2f'),lettersize*. 8,'light') % PROCEDURES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

5/09/17 16:49 C:\Users\caminstech\Desk...\PlotNetwork2.m 4 of 7 function plot_circ(r, X0, Y0, theta, N,option) % PLOT_CIRCUNFERENCE % R: radio de la circunferencia % X0: coordenada de abcisas del centro de la circunferencia % Y0: coordenada de ordenadas del centro de la circunferencia % N: número de puntos de la representación % option: 0, sin fondo; 1, fondo blanco; 2, fondo color % theta: modifies the first point (0 implies o'clock) rot=pi/2+theta; angle=linspace(0,2*pi,n+1)+rot; X=cos(angle)*R+X0; Y=sin(angle)*R+Y0; switch option case 1 patch(x,y,[1 1 1]) case 2 patch (X,Y,[0 0 0.5]) plot(x,y,'color',[0 0.5], 'MarkerSize', 2) axis equal function Labels(P1,P2,dist,label,lettersize,format) % WRITE LABELS IN THE MIDDLE OF A LINE DEFFINED BY P1=[x1 y1] AND P2=[x2 y2] % P1 and P2 are the coordinates of the line extremes % dist is the label distance to the line % label is the text to write % format: light normal demi bold if P2==P1 Xtitle=(P1(1)+P2(1))/2+dist*cos(pi/2); Ytitle=(P1(2)+P2(2))/2+dist*sin(pi/2); text(xtitle,ytitle, label,'horizontalalignment','center','verticalalignment','baseline','fontsize', lettersize,'fontweight',format) if (P2(2)-P1(2))>=0 if (P2(1)-P1(1))>=0 ANG=atan((P2(2)-P1(2))/(P2(1)-P1(1))); ANG=pi+atan((P2(2)-P1(2))/(P2(1)-P1(1))); if (P2(1)-P1(1))>=0 ANG=atan((P2(2)-P1(2))/(P2(1)-P1(1))); ANG=pi+atan((P2(2)-P1(2))/(P2(1)-P1(1))); Xtitle=(P1(1)+P2(1))/2+dist*cos(ANG+pi/2); Ytitle=(P1(2)+P2(2))/2+dist*sin(ANG+pi/2); text(xtitle,ytitle,label,'rotation', ANG*180/pi,'HorizontalAlignment','center','VerticalAlignment','baseline','FontSize', lettersize,'fontweight',format)

5/09/17 16:49 C:\Users\caminstech\Desk...\PlotNetwork2.m 5 of 7 function Cross(x0,y0,Csize,theta,color) %PLOT AN ANNOTATION CROSS r=[cos(theta) sin(theta); -sin(theta) cos(theta)]; %-cross xx1=csize*[0 0]; yy1=csize*[2 -.8]; xx2=csize*[.5 -.5]; yy2=csize*[.5 -.5]; %-rotates and translates the plot XY1=r*[xx1;yy1]; x=x0+xy1(1,:); y=y0+xy1(2,:); plot(x,y,'color',color,'linewidth',.5); XY=r*[xx2;yy2]; x=x0+xy(1,:); y=y0+xy(2,:); plot(x,y,'color',color,'linewidth',2); function colors=gencolor(elements) % Generate a matrix of random colors (one color an element) % Fixing the seed value to repeat the same random numbers rand('seed',123456); colors=zeros(elements,3); for i=1:elements colors(i,:)=[rand rand rand ]; % Drawing Supports %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function roller(x0,y0,theta,r) %PLOT A ROLLER SUPPORT r=[cos(theta) sin(theta); -sin(theta) cos(theta)]; %-translates and rotates the origin XY=[x0;y0]+r*[0; -R]; x=xy(1); y=xy(2); %-triangle XY=[x;y]+r*[0; -2*R]; plot_circ(2*r,xy(1),xy(2),-theta,3,0) %-roller XY=[x x;y y]+r*[-.8*r +.8*R; -3.8*R -3.8*R]; plot_circ(0.8*r,xy(1,1),xy(2,1),0,15,0) plot_circ(0.8*r,xy(1,2),xy(2,2),0,15,0) %-floor XY=[x x;y y]+r*[-3.5*r 3.5*R; -4.7*R -4.7*R]; plot(xy(1,:),xy(2,:),'color',[0 0.5],'LineWidth',3); function hinged(x0,y0,theta,r) %PLOT A HINGED SUPPORT r=[cos(theta) sin(theta); -sin(theta) cos(theta)];

5/09/17 16:49 C:\Users\caminstech\Desk...\PlotNetwork2.m 6 of 7 %-translates and rotates the origin XY=[x0;y0]+r*[0; -R]; x=xy(1); y=xy(2); %-triangle XY=[x;y]+r*[0; -3*R]; plot_circ(3*r,xy(1),xy(2),-theta,3,0) %-floor XY=[x x;y y]+r*[-3.5*r 3.5*R; -4.6*R -4.6*R]; plot(xy(1,:),xy(2,:),'color',[0 0.5],'LineWidth',3); function fixed(x0,y0,theta,r) %PLOT A FIXED SUPPORT theta=theta-pi/2; r=[cos(theta) sin(theta); -sin(theta) cos(theta)]; %-translates and rotates the origin XY=[x0;y0]+r*[-1.25*R; 0]; x=xy(1); y=xy(2); %-floor XY=[x x;y y]+r*[0 0; 3.5*R -3.5*R]; plot(xy(1,:),xy(2,:),'color',[0 0.5],'LineWidth',3); function rollerfixed(x0,y0,theta,r) %PLOT A ROLLER-FIXED SUPPORT r=[cos(theta) sin(theta); -sin(theta) cos(theta)]; %-translates and rotates the origin XY=[x0;y0]+r*[0; -1.25*R]; x=xy(1); y=xy(2); %-ceil XY=[x x;y y]+r*[-2*r 2*R; 0 0]; plot(xy(1,:),xy(2,:),'color',[0 0.5]); %-roller XY=[x x;y y]+r*[-.8*r +.8*R; -.8*R -.8*R]; plot_circ(0.8*r,xy(1,1),xy(2,1),0,15,0) plot_circ(0.8*r,xy(1,2),xy(2,2),0,15,0) %-floor XY=[x x;y y]+r*[-3.5*r 3.5*R; -1.7*R -1.7*R]; plot(xy(1,:),xy(2,:),'color',[0 0.5],'LineWidth',3); function spring(x0,y0,theta,r) %PLOT A SPRING SUPPORT r=[cos(theta) sin(theta); -sin(theta) cos(theta)]; %-translates and rotates the origin XY=[x0;y0]+r*[0; -R]; x=xy(1); y=xy(2); %-spring xx= R/2*[0 0 1-1 1-1 1-1 0 0]; yy=-r/2*[0 1 2 3 4 5 6 7 8 9]; XY=[x*ones(1,10);y*ones(1,10)]+r*[xx; yy]; plot(xy(1,:),xy(2,:),'color',[0 0.5]); %-floor XY=[x x;y y]+r*[-3.5*r 3.5*R; -4.5*R -4.5*R];

5/09/17 16:49 C:\Users\caminstech\Desk...\PlotNetwork2.m 7 of 7 plot(xy(1,:),xy(2,:),'color',[0 0.5],'LineWidth',3);

5/09/17 16:50 C:\Users\caminstech\De...\PrepareReport2.m 1 of 1 function PrepareReport2(Example) global ScreenOption %--- To save the results in a diary % a)file name switch ScreenOption case 0, nfile=['reports\',example,'(summary)']; case 1, nfile=['reports\',example,'(screen)']; case 2, nfile=['reports\',example,'(latex)']; % b)delete previous files if exist('reports','dir')==0 %when the directory does not exist mkdir('reports') %create the directory %when the file and the directory exists try delete(nfile); % c)create the diary diary(nfile); fprintf('example: %s\n',example);

5/09/17 16:50 C:\Users\caminstech\De...\ReadKnownVars2.m 1 of 5 function [KnownName1,valuevars1]=ReadKnownVars2(ForcesNames,nnodes,nbeams) global knowndxdydzwxwywz knowneaiziygjqizqiy knowneaeizeiygjeqizeqiy global valuedxdydzwxwywz valueeaiziygjqizqiy valueeaeizeiygjeqizeqiy global ScreenOption global subbeamseaiziygjqizqiy beamlength global direct knowneaiziygjsdirect valueeaiziygjsdirect v KnownName=cell(1,30*nnodes+29*nbeams); valuevars=sym([]); ind=1; %--- Create forces as symbolic variables for i=1:nnodes eval(sprintf('syms Rx%04.0f',i)) eval(sprintf('syms Ry%04.0f',i)) eval(sprintf('syms Rz%04.0f',i)) eval(sprintf('syms Mx%04.0f',i)) eval(sprintf('syms My%04.0f',i)) eval(sprintf('syms Mz%04.0f',i)) %--- Displacements & forces [r c]=size(knowndxdydzwxwywz); auxvar='dxdydzwxwywz'; for node=1:nnodes for j=1:6 pos=find(node==knowndxdydzwxwywz{j,:}); if ~isempty(pos) && valuedxdydzwxwywz{j}(pos)==0 KnownName{ind}=sprintf('%s%04.0f',auxvar(j),node); valuevars=[valuevars valuedxdydzwxwywz{j}(pos)]; KnownName(ind)=ForcesNames(6*(node-1)+j); valuevars=[valuevars KnownName(ind)]; ind=ind+1; %--- Individual E,A,Iz,Iy,G,J,QIz,QIy if direct==1 transformdata={[1:16]; [1 4 7 31 34 37]; [2 5 8 10 13 16 32 35 38 40 43 46]; [3 6 9 11 14 17 33 36 39 42 44 47]; [12 15 18 42 45 48]; [12 15 18 42 45 48];[19 21 23 25 27 29 49 51 53 55 57 59]; [20 22 24 26 28 30 50 52 54 56 58 60]}; auxvar='eaiziygjqizqiy'; for beam=1:nbeams for k=1:8 type=subbeamseaiziygjqizqiy{k}(beam); pos=find(type==knowneaiziygjsdirect{k}); if pos>0 for r=transformdata{k} KnownName{ind}=sprintf('%s%04.0f',auxvar(k),knownEAIzIyGJSdirect {k}(pos)); valuevars=[valuevars valueeaiziygjsdirect{k}(pos)];

5/09/17 16:50 C:\Users\caminstech\De...\ReadKnownVars2.m 2 of 5 ind=ind+1; transformdata={[1:16]; [1 4 7 31 34 37]; [2 5 8 10 13 16 32 35 38 40 43 46]; [3 6 9 11 14 17 33 36 39 42 44 47]; [12 15 18 42 45 48]; [12 15 18 42 45 48];[19 21 23 25 27 29 49 51 53 55 57 59]; [20 22 24 26 28 30 50 52 54 56 58 60]}; auxvar='eaiziygjqiziy'; for beam=1:nbeams for k=1:8 type=subbeamseaiziygjqizqiy{k}(beam); pos=find(type==knowneaiziygjqizqiy{k}); if pos>0 for r=transformdata{k} KnownName{ind}=sprintf('%s%04.0f',auxvar(k),knownEAIzIyGJQIzQIy{k} (pos)); valuevars=[valuevars valueeaiziygjqizqiy{k}(pos)]; ind=ind+1; %--- Pairs EA, EIz, EIy, GJ, EQIz and EQIy auxvar='aeeizeiygjeqizeqiy'; for beam=1:nbeams for k=1:6 pos=find(beam==knowneaeizeiygjeqizeqiy{k}); if pos>0 for r=transformdata{k+1} KnownName{ind}=sprintf('%s%04.0f%s%04.0f',auxvar(2*k-1), knowneaeizeiygjeqizeqiy{k}(pos),auxvar(2*k),knowneaeizeiygjeqizeqiy{k}(pos)); valuevars=[valuevars valueeaeizeiygjeqizeqiy{k}(pos)]; ind=ind+1; %--- Delete the empty cells KnownName=KnownName(1:ind-1); valuevars=valuevars(1:ind-1); %--- Sort and check the solution [KnownName,ind]=sort(KnownName); valuevars=valuevars(ind); [KnownName1,pos0,pos]=unique(KnownName); valuevars1=valuevars(pos0); if direct==1 cont1=1;

5/09/17 16:50 C:\Users\caminstech\De...\ReadKnownVars2.m 3 of 5 cont2=1; cont3=1; cont4=1; cont5=1; cont6=1; cont7=1; for i=1:length(knownname1) aux1=char(knownname1(i)); auxl=aux1(1:1); auxn=str2double(aux1(2:)); if auxl=='e' auxe(cont1)=auxn; valuee(cont1)=valuevars1(i); cont1=cont1+1; if auxl=='iz' auxiz(cont2)=auxn; valueiz(cont2)=valuevars1(i); cont2=cont2+1; if auxl=='iy' auxiy(cont3)=auxn; valueiy(cont3)=valuevars1(i); cont3=cont3+1; if auxl=='g' auxg(cont4)=auxn; valueg(cont4)=valuevars1(i); cont4=cont4+1; if auxl=='j' auxj(cont5)=auxn; valuej(cont5)=valuevars1(i); cont5=cont5+1; if auxl=='qiz' auxqiz(cont6)=auxn; valueqiz(cont6)=valuevars1(i); cont6=cont6+1; if auxl=='qiy' auxqiy(cont7)=auxn; valueqiy(cont7)=valuevars1(i); cont7=cont7+1; for i=1:length(subbeamseaiziygjqizqiy{1}) auxl=beamlength(i); sube=subbeamseaiziygjqizqiy{1}(i); subiz=subbeamseaiziygjqizqiy{3}(i); subiy=subbeamseaiziygjqizqiy{4}(i); subg=subbeamseaiziygjqizqiy{5}(i); subj=subbeamseaiziygjqizqiy{6}(i); subqiz=subbeamseaiziygjqizqiy{7}(i); subqiy=subbeamseaiziygjqizqiy{7}(i); for j=1:length(auxe) if auxe(j)==sube vale=valuee(j);

5/09/17 16:50 C:\Users\caminstech\De...\ReadKnownVars2.m 4 of 5 for j=1:length(auxiz) if auxiz(j)==subiz valiz=valueiz(j); for j=1:length(auxiy) if auxiy(j)==subiy valiy=valueiy(j); for j=1:length(auxg) if auxg(j)==subg valg=valueg(j); for j=1:length(auxj) if auxj(j)==subj valj=valuej(j); for j=1:length(auxqiz) if auxqiz(j)==subqiz valqiz=valueqiz(j); for j=1:length(auxqiy) if auxqiy(j)==subqiy valqiy=valueqiy(j); if valqiz==0 QIz(i)=sym(0); QIz(i)=valIz*((12*valE*valIz)/((valE/(2+2*dz))*valQIz*auxl^2))/(1+ ((12*valE*valIz)/((valE/(2+2*dz))*valQIz*auxl^2))); if valqiy==0 QIy(i)=sym(0); QIy(i)=valIy*((12*valE*valIy)/((valE/(2+2*dz))*valQIy*auxl^2))/(1+ ((12*valE*valIy)/((valE/(2+2*dz))*valQIy*auxl^2))); L=1; QIz=sym(eval(QIz)); QIy=sym(eval(QIy)); cont1=1; cont2=1; for i=1:length(knownname1) aux1=char(knownname1(i)); auxl=aux1(1:1); if auxl=='qiz' valuevars1(i)=qiz(cont1); cont1=cont1+1;

5/09/17 16:50 C:\Users\caminstech\De...\ReadKnownVars2.m 5 of 5 if auxl=='qiy' valuevars1(i)=qiy(cont2); cont2=cont2+1; %--- Plotting information if ScreenOption==1 fprintf('--- Initial known forces and boundary conditions:\n') for i=1:length(valuevars1) fprintf('%s: %s\n',knownname1{i},char(valuevars1(i))) fprintf('\n') if ScreenOption==2 fprintf('%%--- Initial known forces and boundary conditions:\n') fprintf('\\begin{tabular}{llllllll}\n'); ncol=8; for i=1:ceil(length(valuevars1)/ncol)*ncol if i<=length(valuevars1) fprintf('%s=%s',knownname1{i},char(valuevars1(i))); if floor(i/ncol)==i/ncol && i<length(valuevars1) fprintf('\\\\ \n'); if floor(i/ncol)==i/ncol && i==ceil(length(valuevars1)/ncol)*ncol fprintf(' \n'); fprintf(' & '); fprintf('\\{tabular}\n\n')

5/09/17 16:50 C:\Users\caminst...\StiffnessCalculus2.m 1 of 10 function [Var,Val]=StiffnessCalculus2(D,zk,zd,zpd_vector,zpd_matrix,Ud,Vars,NumVars) % NUMERIC CALCULUS % Solves the system [-D* I].[zk;zd*]=zpd* where D*,zd* and zpd* % zpd=zpd_matrix*zpd_vector is the particular solution associated with zd global ScreenOption error [neq,~]=size(d); %number of equations nm=length(ud); %number of measurements %--- Some definitions Dast=D; %D* zdast=zd; %zd* zpd_matrixast=zpd_matrix; %zpd* % [r,c]=size(zpd_matrixast); M=[-Dast,eye(r)]; M(abs(M)<error)=0; %precision cleaning x=[zk,zdast]; %--- Delete the null columns validcol=find(sum(abs(m),1)>0); M=M(:,validcol); x=x(validcol); %--- Multiply each column of M by the corresponding measurement ncol=length(validcol); factor=cell(1,ncol); sympl_x=x; % a)find any measurement in the complex variable and simplify the complex variables for i=1:ncol aux1=x{i}; for j=1:nm aux2=ud{j}; commtxt=strfind(aux1,aux2); %find common text if ~isempty(commtxt) validtxt=setdiff(1:length(aux1),commtxt:commtxt+4); %valid text position aux1=aux1(validtxt); sympl_x{i}=aux1; if isempty(factor{i}) factor{i}=aux2; factor{i}=[factor{i},'*',aux2]; %(factor,sympl_x such as x=factor*sympl_x) % b) evalue the introduced data for j=1:length(vars) eval(sprintf('%s=%d;',char(vars(j)),double(numvars(j)))); factnum=ones(1,ncol); for i=1:ncol if ~isempty(factor{i}) factnum(i)=eval(factor{i});

5/09/17 16:50 C:\Users\caminst...\StiffnessCalculus2.m 2 of 10 zpd_vector=eval(zpd_vector); % c) multiply the matrix by the factors M1=M; for i=1:ncol if ~isempty(factnum(i)) M1(:,i)= M(:,i)*factNum(i); % d)get together the columns asociated with the equal terms unique_x=unique(sympl_x); ncol=length(unique_x); M2=zeros(neq,ncol); for i=1:length(unique_x) pos=[]; %find the position of the equal terms for j=1:length(sympl_x) if strcmp(unique_x{i},sympl_x{j}) %equal terms pos=[pos j]; M2(:,i)=sum(M1(:,pos),2); % e)if there is a completely known term, the associated column is moved to the indepent term % e.1) identify the completely known term complknown=[]; for i=1:length(unique_x) if isempty(unique_x{i}) complknown=[complknown, i]; keptvar=setdiff(1:length(unique_x),complknown); % e.2) update the matrices unique_x=unique_x(keptvar); indterm=zeros(neq,1); %indepent term %when there is any completly known term, this term is written as the indepent one if ~isempty(complknown) indterm=-m2(:,complknown); M2=M2(:,keptvar); %(in this point, M2*unique_x=zpdast+indterm) %--- Results [r,c]=size(m2); IT=zpd_matrixast*zpd_vector+indterm; if r==c %square matrix % a) solve the system Val=eval(M2\IT);

5/09/17 16:50 C:\Users\caminst...\StiffnessCalculus2.m 3 of 10 %no square matrix: [unique_x,val]=specialcase(m2,unique_x,it); %--- Postprocess (simplify complex variables) % a) separate the simple vars from the other ones simplvar={}; complvar={}; possimplvar=[]; %positions of the simple variables poscomplvar=[]; %positions of the complex variables for i=1:length(unique_x) if length(char(unique_x{i}))==5 simplvar=[simplvar,unique_x{i}]; possimplvar=[possimplvar,i]; complvar=[complvar,unique_x{i}]; poscomplvar=[poscomplvar,i]; nsimplvar=length(simplvar); simplval=val(possimplvar); % b) when there is any complex var I try to simplify if ~isempty(complvar) for i=1:length(complvar) aux1=complvar{i}; for j=1:nsimplvar aux2=simplvar{j}; commtxt=strfind(aux1,aux2); %find common text if ~isempty(commtxt) validtxt=setdiff(1:length(aux1),commtxt:commtxt+4); %valid text position aux1=aux1(validtxt); simplvar=[simplvar,aux1]; simplval=[simplval;val(poscomplvar(i))/val(possimplvar(j))]; Val=simplVal'; Var=simplVar'; %--- Plotting information if ScreenOption<2 fprintf('\n--- Numeric observed values\n') Var,Val %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [Var,Val]=SpecialCase(M2,unique_x,b) global measur_values

5/09/17 16:50 C:\Users\caminst...\StiffnessCalculus2.m 4 of 10 % VERIFICACION ---------------------------------------------------- [NI,nvar]=size(M2); %--- 1) Identify the stiffness and the displacements vect1={}; vect2={}; for i=1:nvar aux=unique_x{i}(1:5); if length(unique_x{i})<6 if strcmp(aux(1),'a') strcmp(aux(1),'iz') strcmp(aux(1),'iy') strcmp(aux (1),'J') vect1=[vect1;aux]; vect2=[vect2;'1']; vect1=[vect1;'1']; vect2=[vect2;aux]; vect1=[vect1;aux]; vect2=[vect2;unique_x{i}(6:)]; % vsimples=[setdiff(unique(vect1),'1');setdiff(unique(vect2),'1');]; nvsimples=length(vsimples); % vm=zeros(nvar,nvsimples); %verification matrix (simple variables per equation) for i=1:nvar for j=1:nvsimples if strcmp(vect1{i},vsimples{j}) strcmp(vect2{i},vsimples{j}) vm(i,j)=1; %vm necessaryvars=nvsimples-rank(vm); if necessaryvars>0; %es decir, que el número de columnas de vm fprintf('no tiene solución única. Solución en función de %d variable(s)\n', necessaryvars) %--- Data query for the some necessary vars %a) identify the displacements aux=[]; for i=1:nvsimples if ~isempty([strfind(vsimples{i},'dx'),strfind(vsimples{i},'dy'),strfind (vsimples{i},'dz'),strfind(vsimples{i},'wx'),strfind(vsimples{i},'wy'),strfind (vsimples{i},'wz')]) aux=[aux i]; %b) window to select naux=length(aux); str=cell(1,naux); pos=1; for i=aux

5/09/17 16:50 C:\Users\caminst...\StiffnessCalculus2.m 5 of 10 str{pos}=vsimples{i}; pos=pos+1; txt=sprintf('select %d measurements:',necessaryvars); [s,ok]=choosebox('name','seletion of some meassurents','promptstring','possible measurements:','selectstring',txt,'liststring',str); if Ok %AÑADIR CONTROL DE INTRODUCCION MENOR O MAYOR DE DATOS s=s(1:necessaryvars); %delete the possible error data knownvars=vsimples(aux(s)); for j=1:necessaryvars % search the values in the introduced measurements [c,ni,pos]=intersect(knownvars(j),measur_values(:,1)); if ~isempty(c) knownvals(j)=measur_values{pos,2}; return fprintf('tiene solución. \n') knownvars={}; knownvals=[]; %--- Resolution by Gams [Var,Val]=SolvebyGams(M2,unique_x,b,knownvars,knownvals); function [Var,Val]=SolvebyGams(M2,unique_x,IT,knownvars,knownvals) %Compute the solution for the system M2*unique_x=IT by GAMS %where knownvars are some known values (knownvals) global error [neq,nvar]=size(m2); %--- Write the vector of mixed variables into products of variables vect1={}; vect2={}; for i=1:nvar vect1=[vect1;unique_x{i}(1:5)]; if length(unique_x{i})>5 vect2=[vect2;unique_x{i}(6:10)]; vect2=[vect2;'1']; %--- Identify the positive or the other variables Allvars=unique([vect1;vect2]); if length(allvars)>neq %it is due to the '1' value Allvars=Allvars(2:); %delete the number '1' positive=[];

5/09/17 16:50 C:\Users\caminst...\StiffnessCalculus2.m 6 of 10 others=[]; for i=1:neq aux=allvars{i}; if strcmp(aux(1),'a') strcmp(aux(1),'iz') strcmp(aux(1),'iy') strcmp(aux (1),'J') positive=[positive; Allvars(i)]; others=[others; Allvars(i)]; npositive=length(positive); %--- Data query prompt=cell(1,npositive); defaultanswer=cell(1,npositive); for i=1:npositive prompt{i}=positive{i}; defaultanswer{i}=''; ok=0; while ~ok % a) ask for data options.resize='on'; options.windowstyle='normal'; answer_str = inputdlg(prompt,'approximate values',1,defaultanswer,options); % b) transform to number answer_num=zeros(npositive,1); for i=1:npositive aux=str2num(answer_str{i}); if ~isempty(aux) && isnumeric(aux)&& aux>0 answer_num(i,1)=aux; % c) check data if isempty(find(answer_num==0)) ok=1; h = errordlg('there is an error in the input data.'); % c.1) change the default answer defaultanswer=answer_str; %--- Create the equations as symbolic ones auxvar=cell(nvar,1); for i=1:nvar auxvar{i}=[vect1{i},'*',vect2{i}]; digits(-round(log10(error))) auxeq=sym(m2,'d')*auxvar-vpa(it); %--- Create the GAMS file %a) Open the file fid = fopen('eqsolve.gms','w');

5/09/17 16:50 C:\Users\caminst...\StiffnessCalculus2.m 7 of 10 %b) Write the headlines fprintf(fid,'$title EQSolve\n\n'); fprintf(fid,'file out/eq.out/;\n'); fprintf(fid,'file out0/eqsolution.m/; \n\n'); fprintf(fid,'put out;\n\n'); fprintf(fid,'option nlp=conopt;\n\n'); %c) Write the sets fprintf(fid,'sets\n'); fprintf(fid,'i equations /1*%d/;\n\n',neq); %d) Write the positive variables fprintf(fid,'positive VARIABLES\n'); for i=1:npositive fprintf(fid,'%s\n',char(positive(i))); fprintf(fid,';\n\n'); %e) Write the other variables fprintf(fid,'variables\n'); for i=1:length(others) fprintf(fid,'%s\n',char(others(i))); fprintf(fid,'epsilon(i)\n'); fprintf(fid,'z;\n\n'); %f) Write the equations fprintf(fid,'equations\n'); fprintf(fid,'obj\n'); for i=1:neq %totaleq fprintf(fid,'eq%d\n',i); fprintf(fid,';\n\n'); fprintf(fid,'obj..z=e=0.01*sum(i,power(epsilon(i),2));\n'); for i=1:neq fprintf(fid,'eq%d..epsilon(''%d'')=e=%s;\n',i,i,char(auxeq(i))); %%%%%%%%%%%%%%%%%%%%%% % fprintf(fid,'eq%d..0=e=%s;\n',i,char(auxeq(i))); %SOLO PARA PROBLEMAS SIN ERRORES NUMERICOS %g) Write the model fprintf(fid,'\nmodel M1/obj,'); for i=1:neq-1 %totaleq fprintf(fid,'eq%d,',i); fprintf(fid,'eq%d/;\n\n',neq); %totaleq % %h) Write the lower solution % fprintf(fid,'*--- LOWER SOLUTION\n'); % for i=1:length(positive) % fprintf(fid,'%s.lo=%d;\n',char(positive(i)),1000000); %%%%%%%%%%%%%%%%%%%%%%% % % for i=1:length(others)

5/09/17 16:50 C:\Users\caminst...\StiffnessCalculus2.m 8 of 10 % fprintf(fid,'%s.lo=%d;\n',char(others(i)),-0.001); %%%%%%%%%%%%%%%%%%%%%%% % % fprintf(fid,'\n'); % %h) Write the upper solution % fprintf(fid,'*--- UPPER SOLUTION\n'); % for i=1:length(positive) % fprintf(fid,'%s.up=%d;\n',char(positive(i)),100); % % for i=1:length(others) % fprintf(fid,'%s.up=100;\n',char(others(i))); % % fprintf(fid,'\n'); %h) Write the initial solution fprintf(fid,'*--- INITIAL SOLUTION\n'); for i=1:length(positive) fprintf(fid,'%s.l=%d;\n',char(positive(i)),answer_num(i)); %%%%%%%%%%%%%%%%%%%%%%% for i=1:length(others) fprintf(fid,'%s.l=0;\n',char(others(i))); fprintf(fid,'\n'); if ~isempty(knownvars) %h) Write the known variables fprintf(fid,'*--- FIXED VALUES\n'); for i=1:length(knownvars) fprintf(fid,'%s.fx=%d;\n',knownvars{i},knownvals(i)); %%%%%%%%%%%%%%%%%%%%%%% fprintf(fid,'\n'); %j) Write the solve fprintf(fid,'*--- SOLVING THE PROBLEM\n'); fprintf(fid,'m1.optfile=1;\n'); fprintf(fid,'solve M1 USING nlp MINIMIZING z;\n'); fprintf(fid,'put "z=",z.l:15:8," modelstat=",m1.modelstat," solvestat=",m1.solvestat," resusd=",m1.resusd/;\n\n'); %k) Write the solution fprintf(fid,'*--- WRITE IN A MATLAB FILE\n'); fprintf(fid,'put out0;\n'); fprintf(fid,'put "function Val=EQSolution"/;\n'); fprintf(fid,'put out;\n\n'); fprintf(fid,'*--- WRITTING THE SOLUTION\n'); fprintf(fid,'if(m1.modelstat>3 or M1.solvestat<>1,\n'); fprintf(fid,'* a) write the no existency of a optimal solutions\n'); fprintf(fid,' put "--- THERE IS NOT A OPTIMAL SOLUTION:"/;\n'); fprintf(fid,'* b) write in a MATLAB file \n'); fprintf(fid,' put out0;\n'); fprintf(fid,' put "Val=[];"/;\n'); fprintf(fid,' put out;\n'); fprintf(fid,'\n');

5/09/17 16:50 C:\Users\caminst...\StiffnessCalculus2.m 9 of 10 fprintf(fid,'* a) write on screen the solution\n'); fprintf(fid,' put "--- OPTIMAL SOLUTION:"/;\n'); fprintf(fid,' put " - Cost function: z=", z.l:10:5/;\n'); fprintf(fid,' put " - Values: "; put /;\n'); for i=1:length(positive) fprintf(fid,' put " %s= ";put %s.l:15:8/;\n',char(positive(i)),char (positive(i))); for i=1:length(others) fprintf(fid,' put " %s= ";put %s.l:15:8/;\n',char(others(i)),char (others(i))); fprintf(fid,' put " - Error[sum(asb(epsilon))]= ";put sum(i,abs(epsilon.l (I))):15:8/;\n'); fprintf(fid,'* b) write in a MATLAB file the value of the variables\n'); fprintf(fid,' put out0;\n'); fprintf(fid,' put "Val=[";\n'); for i=1:length(positive) fprintf(fid,' put %s.l:15:8;put/;\n',char(positive(i))); for i=1:length(others) fprintf(fid,' put %s.l:15:8;put/;\n',char(others(i))); fprintf(fid,' put "];"/;\n'); fprintf(fid,' put "fprintf(''error de la Solucion: %%-25.8f\\n'',";put sum(i, abs(epsilon.l(i))):15:8;put ")'';"/; \n'); fprintf(fid,' put out;\n'); fprintf(fid,');\n\n'); %l) Close the file fclose(fid); %--- Run GAMS %a) GAMS execution (In "variables de entorno>variables de sistema", añadir en "path" el correspondiente de GAMS) delete('eqsolution.m') %delete the previoux calculus!gams EQSolve.gms %b) Load the GAMS solution Val=EQSolution; if ~isempty(val) Var=[positive;others]; Var=[];

5/09/17 16:50 C:\Users\caminst...\StiffnessCalculus2.m 10 of 10

6/09/17 10:04 C:\Users\caminstech\Desktop\TFG_Scripts... 1 of 6 function GSM=AssemblingModifiedStiffnessMatrixNEW2(beams,beamlength,nodecoordinates, nnodes,nbeams,nsize) global Symbway if Symbway==0 GSM=zeros(6*nnodes,nsize); GSM=sym(zeros(6*nnodes,nsize)); %--- AssemblingStandardStiffessMatrix: for beam=1:nbeams sm=elementalmstiffmatrix(beamlength(beam),nodecoordinates(beams(beam,1),1), nodecoordinates(beams(beam,1),2),nodecoordinates(beams(beam,2),1),nodecoordinates (beams(beam,2),2)); GSM(6*beams(beam,1)-2:6*beams(beam,1),60*(beam-1)+1:60*(beam-1)+1:60*(beam-1)+30) =GSM(6*beams(beam,1)-2:6*beams(beam,1),60*(beam-1)+1:60*(beam-1)+60)+sM(1:6,1:30); GSM(6*beams(beam,1)-2:6*beams(beam,1),60*(beam-1)+36:60*(beam-1)+1:60*(beam-1)+60) =GSM(6*beams(beam,1)-2:6*beams(beam,1),60*(beam-1)+36:60*(beam-1)+30)+sM(1:6,36:60); GSM(6*beams(beam,2)-2:6*beams(beam,2),60*(beam-1)+1:60*(beam-1)+1:60*(beam-1)+30) =GSM(6*beams(beam,2)-2:6*beams(beam,2),60*(beam-1)+1:60*(beam-1)+60)+sM(7:12,1:30); GSM(6*beams(beam,2)-2:6*beams(beam,2),60*(beam-1)+36:60*(beam-1)+1:60*(beam-1)+60) =GSM(6*beams(beam,2)-2:6*beams(beam,2),60*(beam-1)+36:60*(beam-1)+30)+sM(7:12,36:60); function mm=elementalmstiffmatrix(l,r11,r12,r13,r21,r22,r23,r31,r32,r33) % xk=; % yk=; % zk=; % r11=(x2-x1)/sqrt((x2-x1)^2+(y2-y1)^2+(z2-z1)^2); % r12=(y2-y1)/sqrt((x2-x1)^2+(y2-y1)^2+(z2-z1)^2); % r13=(z2-z1)/sqrt((x2-x1)^2+(y2-y1)^2+(z2-z1)^2); % yx=(z2-z1)*(yk-y1)-(y2-y1)-(zk-z1); % yy=(x2-x1)*(zk-z1)-(z2-z1)-(xk-x1); % yz=(y2-y1)*(xk-x1)-(x2-x1)-(yk-y1); % r21=yx/sqrt((x2-x1)^2+(y2-y1)^2+(z2-z1)^2); % r22=yy/sqrt((x2-x1)^2+(y2-y1)^2+(z2-z1)^2); % r23=yz/sqrt((x2-x1)^2+(y2-y1)^2+(z2-z1)^2); % zx=(y2-y1)*(zk-z1)-(z2-z1)-(yk-y1); % zy=(z2-z1)*(xk-x1)-(x2-x1)-(zk-z1); % zz=(x2-x1)*(yk-y1)-(y2-y1)-(xk-x1); % r31=zx/sqrt((x2-x1)^2+(y2-y1)^2+(z2-z1)^2); % r32=zy/sqrt((x2-x1)^2+(y2-y1)^2+(z2-z1)^2); % r33=zz/sqrt((x2-x1)^2+(y2-y1)^2+(z2-z1)^2); L=10 r11=0.85 r12=0.79 r13=0.76 r21=0.79 r22=0.67 r23=0.77 r31=0.76 r32=0.77

6/09/17 10:04 C:\Users\caminstech\Desktop\TFG_Scripts... 2 of 6 r33=0.89 % %--- Esfuerzo Axil (EA) MEAdx1=[ (r11^2)/l; (r11*r21)/l; (r11*r31)/l; 0; 0; 0; -(r11^2)/l; -(r11*r21)/l; -(r11*r31)/l; 0; 0; 0]; MEAdy1=[ (r21*r11)/l; (r21^2)/l; (r21*r31)/l; 0; 0; 0; -(r21*r11)/l; -(r21^2)/l; -(r21*r31)/l; 0; 0; 0]; MEAdz1=[ (r31*r11)/l; (r31*r21)/l; (r31^2)/l; 0; 0; 0; -(r31*r11)/l; -(r31*r21)/l; -(r31^2)/l; 0; 0; 0]; MEAdx2=[ -(r11^2)/l; -(r21*r11)/l; -(r11*r31)/l; 0; 0; 0; (r11^2)/l; (r11*r21)/l; (r11*r31)/l; 0; 0; 0]; MEAdy2=[ -(r11*r21)/l; -(r21^2)/l; -(r31*r21)/l; 0; 0; 0; (r21*r11)/l; (r21^2)/l; (r21*r31)/l; 0; 0; 0]; MEAdz2=[ -(r11*r31)/l; -(r21*r31)/l; -(r31^2)/l; 0; 0; 0; (r31*r11)/l; (r31*r21)/l; (r31^2)/l; 0; 0; 0]; %--- Esfuerzo Flector en el Plano XY [1] (EIz) MEIzdx1=[ (r12^2*12)/l^3; (r12*r22*12)/l^3; (r12*r32*12)/l^3; (r12*r13*6)/l^2; (r12*r23*6)/l^2; (r12*r33*6)/l^2; -(r12^2*12)/l^3; -(r12*r22*12)/l^3; -(r12*r32*12)/l^3; (r12*r13*6)/l^2; (r12*r23*6)/l^2; (r12*r33*6)/l^2]; MEIzdy1=[ (r22*r12*12)/l^3; (r22^2*12)/l^3; (r22*r32*12)/l^3; (r22*r13*6)/l^2; (r22*r23*6)/l^2; (r22*r33*6)/l^2; -(r22*r12*12)/l^3; -(r22^2*12)/l^3; -(r22*r32*12)/l^3; (r22*r13*6)/l^2; (r22*r23*6)/l^2; (r22*r33*6)/l^2]; MEIzdz1=[ (r32*r12*12)/l^3; (r32*r22*12)/l^3; (r32^2*12)/l^3; (r32*r13*6)/l^2; (r32*r23*6)/l^2; (r32*r33*6)/l^2; -(r32*r12*12)/l^3; -(r32*r22*12)/l^3; -(r32^2*12)/l^3; (r32*r13*6)/l^2; (r32*r23*6)/l^2; (r32*r33*6)/l^2]; MEIzwx1=[ (r13*r12*6)/l^2; (r13*r22*6)/l^2; (r13*r32*6)/l^2; (r13^2*4)/l; (r13*r23*4)/l; (r13*r33*4)/l; -(r13*r12*6)/l^2; -(r13*r22*6)/l^2; -(r13*r32*6)/l^2; (r13^2*4)/l; (r13*r23*4)/l; (r13*r33*4)/l ]; MEIzwy1=[ (r23*r12*6)/l^2; (r23*r22*6)/l^2; (r23*r32*6)/l^2; (r23*r13*4)/l; (r23*r23*4)/l; (r23*r33*4)/l; -(r23*r12*6)/l^2; -(r23*r22*6)/l^2; -(r23*r32*6)/l^2; (r23*r13*4)/l; (r23*r23*4)/l; (r23*r33*4)/l ]; MEIzwz1=[ (r33*r12*6)/l^2; (r33*r22*6)/l^2; (r33*r32*6)/l^2; (r33*r13*4)/l; (r33*r23*4)/l; (r33^2*4)/l; -(r33*r12*6)/l^2; -(r33*r22*6)/l^2; -(r33*r32*6)/l^2; (r33*r13*4)/l; (r33*r23*4)/l; (r33^2*4)/l ]; MEIzdx2=[ -(r12^2*12)/l^3; -(r22*r12*12)/l^3; -(r32*r12*12)/l^3; - (r13*r12*6)/l^2; -(r23*r12*6)/l^2; -(r33*r12*6)/l^2; (r12^2*12)/l^3; (r12*r22*12)/l^3; (r12*r32*12)/l^3; -(r12*r13*6)/l^2; -(r12*r23*6)/l^2; -(r12*r33*6)/l^2]; MEIzdy2=[ -(r12*r22*12)/l^3; -(r22^2*12)/l^3; -(r32*r22*12)/l^3; - (r13*r22*6)/l^2; -(r23*r22*6)/l^2; -(r33*r22*6)/l^2; (r22*r12*12)/l^3;

6/09/17 10:04 C:\Users\caminstech\Desktop\TFG_Scripts... 3 of 6 (r22^2*12)/l^3; (r22*r32*12)/l^3; -(r22*r13*6)/l^2; -(r22*r23*6)/l^2; -(r22*r33*6)/l^2]; MEIzdz2=[ -(r12*r32*12)/l^3; -(r22*r32*12)/l^3; -(r32^2*12)/l^3; - (r13*r32*6)/l^2; -(r23*r32*6)/l^2; -(r33*r32*6)/l^2; (r32*r12*12)/l^3; (r32*r22*12)/l^3; (r32^2*12)/l^3; -(r32*r13*6)/l^2; -(r32*r23*6)/l^2; -(r32*r33*6)/l^2]; MEIzwx2=[ (r12*r13*6)/l^2; (r22*r13*6)/l^2; (r32*r13*6)/l^2; (r13^2*4)/l; (r23*r13*4)/l; (r33*r13*4)/l; -(r13*r12*6)/l^2; -(r13*r22*6)/l^2; -(r13*r32*6)/l^2; (r13^2*4)/l; (r13*r23*4)/l; (r13*r33*4)/l ]; MEIzwy2=[ (r12*r23*6)/l^2; (r22*r23*6)/l^2; (r32*r23*6)/l^2; (r13*r23*4)/l; (r23*r23*4)/l; (r33*r23*4)/l; -(r23*r12*6)/l^2; -(r23*r22*6)/l^2; -(r23*r32*6)/l^2; (r23*r13*4)/l; (r23*r23*4)/l; (r23*r33*4)/l ]; MEIzwz2=[ (r12*r33*6)/l^2; (r22*r33*6)/l^2; (r32*r33*6)/l^2; (r13*r33*4)/l; (r23*r33*4)/l; (r33^2*4)/l; -(r33*r12*6)/l^2; -(r33*r22*6)/l^2; -(r33*r32*6)/l^2; (r33*r13*4)/l; (r33*r23*4)/l; (r33^2*4)/l ]; %--- Esfuerzo Flector en el Plano XZ [2] (EIy) MEIydx1=[ (r13^2*12)/l^2; (r13*r23*12)/l^2; (r13*r33*12)/l^2; - (r13*r12*6)/l^2; -(r13*r22*6)/l^2; -(r13*r32*6)/l^2; -(r13^2*12)/l^2; -(r13*r23*12)/l^2; -(r13*r33*12)/l^2; (r13*r12*6)/l^2; (r13*r22*6)/l^2; (r13*r32*6)/l^2]; MEIydy1=[ (r23*r13*12)/l^2; (r23*r23*12)/l^2; (r33*r33*12)/l^2; - (r23*r12*6)/l^2; -(r23*r22*6)/l^2; -(r23*r32*6)/l^2; -(r23*r13*12)/l^2; -(r23*r23*12)/l^2; -(r33*r33*12)/l^2; (r23*r12*6)/l^2; (r23*r22*6)/l^2; (r23*r32*6)/l^2]; MEIydz1=[ (r33*r13*12)/l^2; (r33*r23*12)/l^2; (r33*r33*12)/l^2; - (r33*r12*6)/l^2; -(r33*r22*6)/l^2; -(r33*r32*6)/l^2; -(r33*r13*12)/l^2; -(r33*r23*12)/l^2; -(r33*r33*12)/l^2; (r33*r12*6)/l^2; (r33*r22*6)/l^2; (r33*r32*6)/l^2]; MEIywx1=[ -(r12*r13*6)/l^2; -(r12*r23*6)/l^2; -(r12*r33*6)/l^2; (r12*r12*4)/l^3; (r12*r22*4)/l^3; (r12*r32*4)/l^3; -(r12*r13*6)/l^2; -(r12*r23*6)/l^2; -(r12*r33*6)/l^2; (r12*r12*4)/l^3; (r12*r22*4)/l^3; (r12*r32*4)/l^3]; MEIywy1=[ -(r22*r13*6)/l^2; -(r22*r23*6)/l^2; -(r22*r33*6)/l^2; (r22*r12*4)/l^3; (r22*r22*4)/l^3; (r22*r32*4)/l^3; -(r22*r13*6)/l^2; -(r22*r23*6)/l^2; -(r22*r33*6)/l^2; (r22*r12*4)/l^3; (r22*r22*4)/l^3; (r22*r32*4)/l^3]; MEIywz1=[ -(r32*r13*6)/l^2; -(r32*r23*6)/l^2; -(r32*r33*6)/l^2; (r32*r12*4)/l^3; (r32*r22*4)/l^3; (r32*r32*4)/l^3; -(r32*r13*6)/l^2; -(r32*r23*6)/l^2; -(r32*r33*6)/l^2; (r32*r12*4)/l^3; (r32*r22*4)/l^3; (r32*r32*4)/l^3]; MEIydx2=[ -(r13^2*12)/l^2; -(r23*r13*12)/l^2; -(r33*r13*12)/l^2; - (r12*r13*6)/l^2; -(r22*r13*6)/l^2; -(r32*r13*6)/l^2; (r13^2*12)/l^2; (r13*r23*12)/l^2; (r13*r33*12)/l^2; (r13*r12*6)/l^2; (r13*r22*6)/l^2; (r13*r32*6)/l^2]; MEIydy2=[ -(r13*r23*12)/l^2; -(r23*r23*12)/l^2; -(r33*r23*12)/l^2; - (r12*r23*6)/l^2; -(r22*r23*6)/l^2; -(r32*r23*6)/l^2; (r23*r13*12)/l^2; (r23*r23*12)/l^2; (r33*r33*12)/l^2; (r23*r12*6)/l^2; (r23*r22*6)/l^2; (r23*r32*6)/l^2]; MEIydz2=[ -(r13*r33*12)/l^2; -(r33*r33*12)/l^2; -(r33*r33*12)/l^2; - (r12*r33*6)/l^2; -(r22*r33*6)/l^2; -(r32*r33*6)/l^2; (r33*r13*12)/l^2;

6/09/17 10:04 C:\Users\caminstech\Desktop\TFG_Scripts... 4 of 6 (r33*r23*12)/l^2; (r33*r33*12)/l^2; (r33*r12*6)/l^2; (r33*r22*6)/l^2; (r33*r32*6)/l^2]; MEIywx2=[ (r13*r12*6)/l^2; (r23*r12*6)/l^2; (r33*r12*6)/l^2; (r12*r12*4)/l^3; (r22*r12*4)/l^3; (r32*r12*4)/l^3; (r12*r13*6)/l^2; (r12*r23*6)/l^2; (r12*r33*6)/l^2; (r12*r12*4)/l^3; (r12*r22*4)/l^3; (r12*r32*4)/l^3]; MEIywy2=[ (r13*r22*6)/l^2; (r23*r22*6)/l^2; (r33*r22*6)/l^2; (r12*r22*4)/l^3; (r22*r22*4)/l^3; (r32*r22*4)/l^3; (r22*r13*6)/l^2; (r22*r23*6)/l^2; (r22*r33*6)/l^2; (r22*r12*4)/l^3; (r22*r22*4)/l^3; (r22*r32*4)/l^3]; MEIywz2=[ (r13*r32*6)/l^2; (r23*r32*6)/l^2; (r33*r32*6)/l^2; (r12*r32*4)/l^3; (r22*r32*4)/l^3; (r32*r32*4)/l^3; (r32*r13*6)/l^2; (r32*r23*6)/l^2; (r32*r33*6)/l^2; (r32*r12*4)/l^3; (r32*r22*4)/l^3; (r32*r32*4)/l^3]; %--- Esfuerzo Cortante en el Plano XY [1] (EI) MEIzQdx1=[ -(r12^2*12)/l^3; -(r12*r22*12)/l^3; -(r12*r32*12)/l^3; - (r12*r13*6)/l^2; -(r12*r23*6)/l^2; -(r12*r33*6)/l^2; (r12^2*12)/l^3; (r12*r22*12)/l^3; (r12*r32*12)/l^3; (r12*r13*6)/l^2; (r12*r23*6)/l^2; (r12*r33*6)/l^2 ]; MEIzQdy1=[ -(r22*r12*12)/l^3; -(r22^2*12)/l^3; -(r22*r32*12)/l^3; - (r22*r13*6)/l^2; -(r22*r23*6)/l^2; -(r22*r33*6)/l^2; (r22*r12*12)/l^3; (r22^2*12)/l^3; (r22*r32*12)/l^3; (r22*r13*6)/l^2; (r22*r23*6)/l^2; (r22*r33*6)/l^2 ]; MEIzQdz1=[ -(r32*r12*12)/l^3; -(r32*r22*12)/l^3; - (r32^2*12)/l^3; - (r32*r13*6)/l^2; - (r32*r23*6)/l^2; -(r32*r33*6)/l^2; (r32*r12*12)/l^3; (r32*r22*12)/l^3; (r32^2*12)/l^3; (r32*r13*6)/l^2; (r32*r23*6)/l^2; (r32*r33*6)/l^2 ]; MEIzQwx1=[ -(r13*r12*6)/l^2; -(r13*r22*6)/l^2; -(r13*r32*6)/l^2; - (r13^2*4)/l; -(r13*r23*4)/l; -(r13*r33*4)/l; (r13*r12*6)/l^2; (r13*r22*6)/l^2; (r13*r32*6)/l^2; (r13^2*4)/l; (r13*r23*4)/l; (r13*r33*4)/l ]; MEIzQwy1=[ -(r23*r12*6)/l^2; -(r23*r22*6)/l^2; -(r23*r32*6)/l^2; - (r23*r13*4)/l; -(r23*r23*4)/l; -(r23*r33*4)/l; (r23*r12*6)/l^2; (r23*r22*6)/l^2; (r23*r32*6)/l^2; (r23*r13*4)/l; (r23*r23*4)/l; (r23*r33*4)/l ]; MEIzQwz1=[ -(r33*r12*6)/l^2; -(r33*r22*6)/l^2; -(r33*r32*6)/l^2; - (r33*r13*4)/l; -(r33*r23*4)/l; -(r33^2*4)/l; (r33*r12*6)/l^2; (r33*r22*6)/l^2; (r33*r32*6)/l^2; (r33*r13*4)/l; (r33*r23*4)/l; ( r33^2*4)/l ]; MEIzQdx2=[ (r12^2*12)/l^3; (r22*r12*12)/l^3; (r32*r12*12)/l^3; (r13*r12*6)/l^2; (r23*r12*6)/l^2; (r33*r12*6)/l^2; -(r12^2*12)/l^3; -(r12*r22*12)/l^3; -(r12*r32*12)/l^3; -(r12*r13*6)/l^2; -(r12*r23*6)/l^2; -(r12*r33*6)/l^2]; MEIzQdy2=[ (r12*r22*12)/l^3; (r22^2*12)/l^3; (r32*r22*12)/l^3; (r13*r22*6)/l^2; (r23*r22*6)/l^2; (r33*r22*6)/l^2; -(r22*r12*12)/l^3; -(r22^2*12)/l^3; -(r22*r32*12)/l^3; -(r22*r13*6)/l^2; -(r22*r23*6)/l^2; -(r22*r33*6)/l^2]; MEIzQdz2=[ (r12*r32*12)/l^3; (r22*r32*12)/l^3; (r32^2*12)/l^3; (r13*r32*6)/l^2; (r23*r32*6)/l^2; (r33*r32*6)/l^2; -(r32*r12*12)/l^3; -(r32*r22*12)/l^3; -(r32^2*12)/l^3; -(r32*r13*6)/l^2; -(r32*r23*6)/l^2; -(r32*r33*6)/l^2]; MEIzQwx2=[ -(r12*r13*6)/l^2; -(r22*r13*6)/l^2; -(r32*r13*6)/l^2; - (r13^2*4)/l; -(r23*r13*4)/l; -(r33*r13*4)/l; (r13*r12*6)/l^2;

6/09/17 10:04 C:\Users\caminstech\Desktop\TFG_Scripts... 5 of 6 (r13*r22*6)/l^2; (r13*r32*6)/l^2; (r13^2*4)/l; (r13*r23*4)/l; (r13*r33*4)/l ]; MEIzQwy2=[ -(r12*r23*6)/l^2; -(r22*r23*6)/l^2; -(r32*r23*6)/l^2; - (r13*r23*4)/l; -(r23*r23*4)/l; -(r33*r23*4)/l; (r23*r12*6)/l^2; (r23*r22*6)/l^2; (r23*r32*6)/l^2; (r23*r13*4)/l; (r23*r23*4)/l; (r23*r33*4)/l ]; MEIzQwz2=[ -(r12*r33*6)/l^2; -(r22*r33*6)/l^2; -(r32*r33*6)/l^2; - (r13*r33*4)/l; -(r23*r33*4)/l; -(r33^2*4)/l; (r33*r12*6)/l^2; (r33*r22*6)/l^2; (r33*r32*6)/l^2; (r33*r13*4)/l; (r33*r23*4)/l; (r33^2*4)/l ]; %--- Esfuerzo Cortante en el Plano XZ [2] (EI) MEIyQdx1=[ -(r13^2*12)/l^2; -(r13*r23*12)/l^2; -(r13*r33*12)/l^2; (r13*r12*6)/l^2; (r13*r22*6)/l^2; (r13*r32*6)/l^2; (r13^2*12)/l^2; (r13*r23*12)/l^2; (r13*r33*12)/l^2; -(r13*r12*6)/l^2; -(r13*r22*6) /L^2; -(r13*r32*6)/l^2]; MEIyQdy1=[ -(r23*r13*12)/l^2; -(r23*r23*12)/l^2; -(r33*r33*12)/l^2; (r23*r12*6)/l^2; (r23*r22*6)/l^2; (r23*r32*6)/l^2; (r23*r13*12)/l^2; (r23*r23*12)/l^2; (r33*r33*12)/l^2; -(r23*r12*6)/l^2; -(r23*r22*6) /L^2; -(r23*r32*6)/l^2]; MEIyQdz1=[ -(r33*r13*12)/l^2; -(r33*r23*12)/l^2; -(r33*r33*12)/l^2; (r33*r12*6)/l^2; (r33*r22*6)/l^2; (r33*r32*6)/l^2; (r33*r13*12)/l^2; (r33*r23*12)/l^2; (r33*r33*12)/l^2; -(r33*r12*6)/l^2; -(r33*r22*6) /L^2; -(r33*r32*6)/l^2]; MEIyQwx1=[ (r12*r13*6)/l^2; (r12*r23*6)/l^2; (r12*r33*6)/l^2; - (r12*r12*4)/l^3; -(r12*r22*4)/l^3; -(r12*r32*4)/l^3; (r12*r13*6)/l^2; (r12*r23*6)/l^2; (r12*r33*6)/l^2; -(r12*r12*4)/l^3; -(r12*r22*4) /L^3; -(r12*r32*4)/l^3]; MEIyQwy1=[ (r22*r13*6)/l^2; (r22*r23*6)/l^2; (r22*r33*6)/l^2; - (r22*r12*4)/l^3; -(r22*r22*4)/l^3; -(r22*r32*4)/l^3; (r22*r13*6)/l^2; (r22*r23*6)/l^2; (r22*r33*6)/l^2; -(r22*r12*4)/l^3; -(r22*r22*4) /L^3; -(r22*r32*4)/l^3]; MEIyQwz1=[ (r32*r13*6)/l^2; (r32*r23*6)/l^2; (r32*r33*6)/l^2; - (r32*r12*4)/l^3; -(r32*r22*4)/l^3; -(r32*r32*4)/l^3; (r32*r13*6)/l^2; (r32*r23*6)/l^2; (r32*r33*6)/l^2; -(r32*r12*4)/l^3; -(r32*r22*4) /L^3; -(r32*r32*4)/l^3]; MEIyQdx2=[ (r13^2*12)/l^2; (r23*r13*12)/l^2; (r33*r13*12)/l^2; (r12*r13*6)/l^2; (r22*r13*6)/l^2; (r32*r13*6)/l^2; -(r13^2*12)/l^2; -(r13*r23*12)/l^2; -(r13*r33*12)/l^2; -(r13*r12*6)/l^2; -(r13*r22*6) /L^2; -(r13*r32*6)/l^2]; MEIyQdy2=[ (r13*r23*12)/l^2; (r23*r23*12)/l^2; (r33*r23*12)/l^2; (r12*r23*6)/l^2; (r22*r23*6)/l^2; (r32*r23*6)/l^2; -(r23*r13*12)/l^2; -(r23*r23*12)/l^2; -(r33*r33*12)/l^2; -(r23*r12*6)/l^2; -(r23*r22*6) /L^2; -(r23*r32*6)/l^2]; MEIyQdz2=[ (r13*r33*12)/l^2; (r33*r33*12)/l^2; (r33*r33*12)/l^2; (r12*r33*6)/l^2; (r22*r33*6)/l^2; (r32*r33*6)/l^2; -(r33*r13*12)/l^2; -(r33*r23*12)/l^2; -(r33*r33*12)/l^2; -(r33*r12*6)/l^2; -(r33*r22*6) /L^2; -(r33*r32*6)/l^2]; MEIyQwx2=[ -(r13*r12*6)/l^2; -(r23*r12*6)/l^2; -(r33*r12*6)/l^2; - (r12*r12*4)/l^3; -(r22*r12*4)/l^3; -(r32*r12*4)/l^3; -(r12*r13*6)/l^2; -(r12*r23*6)/l^2; -(r12*r33*6)/l^2; -(r12*r12*4)/l^3; -(r12*r22*4)/l^3; -(r12*r32*4)/l^3]; MEIyQwy2=[ -(r13*r22*6)/l^2; -(r23*r22*6)/l^2; -(r33*r22*6)/l^2; - (r12*r22*4)/l^3; -(r22*r22*4)/l^3; -(r32*r22*4)/l^3; -(r22*r13*6)/l^2;

6/09/17 10:04 C:\Users\caminstech\Desktop\TFG_Scripts... 6 of 6 -(r22*r23*6)/l^2; -(r22*r33*6)/l^2; -(r22*r12*4)/l^3; -(r22*r22*4)/l^3; -(r22*r32*4)/l^3]; MEIyQwz2=[ -(r13*r32*6)/l^2; -(r23*r32*6)/l^2; -(r33*r32*6)/l^2; - (r12*r32*4)/l^3; -(r22*r32*4)/l^3; -(r32*r32*4)/l^3; -(r32*r13*6)/l^2; -(r32*r23*6)/l^2; -(r32*r33*6)/l^2; -(r32*r12*4)/l^3; -(r32*r22*4)/l^3; -(r32*r32*4)/l^3]; %--- Esfuerzo Torsor (GJ) MGJwx1=[ 0; 0; 0; (r11^2)/l; (r11*r21)/l; (r11*r31) /L; 0; 0; 0; -(r11^2)/l; -(r11*r21)/l; - (r11*r31)/l]; MGJwy1=[ 0; 0; 0; (r21*r11)/l; (r21*r21)/l; (r21*r31) /L; 0; 0; 0; -(r21*r11)/l; -(r21*r21)/l; - (r21*r31)/l]; MGJwz1=[ 0; 0; 0; (r31*r11)/l; (r31*r21)/l; (r31*r31) /L; 0; 0; 0; -(r31*r11)/l; -(r31*r21)/l; - (r31*r31)/l]; MGJwx2=[ 0; 0; 0; -(r11^2)/l; -(r21*r11)/l; -(r31*r11) /L; 0; 0; 0; (r11^2)/l; (r11*r21)/l; (r11*r31)/l]; MGJwy2=[ 0; 0; 0; -(r11*r21)/l; -(r21*r21)/l; -(r31*r21) /L; 0; 0; 0; (r21*r11)/l; (r21*r21)/l; (r21*r31)/l]; MGJwz2=[ 0; 0; 0; -(r11*r31)/l; -(r21*r31)/l; -(r31*r31) /L; 0; 0; 0; (r31*r11)/l; (r31*r21)/l; (r31*r31)/l]; mm=[meadx1 MEIzdx1 MEIydx1 MEAdy1 MEIzdy1 MEIydy1 MEAdz1 MEIzdz1 MEIydz1 MEIzwx1 MEIywx1 MGJwx1 MEIzwy1 MEIywy1 MGJwy1 MEIzwz1 MEIywz1 MGJwz1 MEIzQdx1 MEIyQdx1 MEIzQdy1 MEIyQdy1 MEIzQdz1 MEIyQdz1 MEIzQwx1 MEIyQwx1 MEIzQwy1 MEIyQwy1 MEIzQwz1 MEIyQwz1 MEAdx2 MEIzdx2 MEIydx2 MEAdy2 MEIzdy2 MEIydy2 MEAdz2 MEIzdz2 MEIydz2 MEIzwx2 MEIywx2 MGJwx2 MEIzwy2 MEIywy2 MGJwy2 MEIzwz2 MEIywz2 MGJwz2 MEIzQdx2 MEIyQdx2 MEIzQdy2 MEIyQdy2 MEIzQdz2 MEIyQdz2 MEIzQwx2 MEIyQwx2 MEIzQwy2 MEIyQwy2 MEIzQwz2 MEIyQwz2];

6/09/17 10:03 C:\Us...\AssemblingLocalStiffnessMatrix2.m 1 of 5 function LSM=AssemblingLocalStiffnessMatrix2(beams,beamlength,nbeams) global Symbway if Symbway==0 LSM=zeros(12*nbeams,60); LSM=sym(zeros(12*nbeams,60)); %---AssemblingLocalStiffnessMatrix2 for beam=1:nbeams sm=elementalmstiffnessmatrix2(beamlength(beam)); LSM(12*beam-11:12*beam,1:60)=LSM(12*beam-11:12*beam,1:60)+sM(1:12,1:60); function mm2=elementalmstiffmatrix2(l) %--- Esfuerzo Axil (EA) MEAdx1=[ 1/L; 0; 0; 0; 0; 0; -1/L; 0; 0; 0; 0; 0]; MEAdy1=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0]; MEAdz1=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0]; MEAdx2=[ -1/L; 0; 0; 0; 0; 0; 1/L; 0; 0; 0; 0; 0]; MEAdy2=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0]; MEAdz2=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0]; %--- Esfuerzo Flector en el plano XY [1] (EIz) MEIzdx1=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIzdy1=[ 0; 12/L^3; 0; 0; 0; 6/L^2; 0; -12/L^3; 0; 0; 0; 6/L^2]; MEIzdz1=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIzwx1=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIzwy1=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIzwz1=[ 0; 6/L^2; 0; 0; 0; 4/L; 0; -6/L^2; 0; 0; 0; 2/L ]; MEIzdx2=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIzdy2=[ 0; -12/L^3; 0; 0; 0; -6/L^2; 0; 12/L^3; 0; 0; 0; -6/L^2]; MEIzdz2=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIzwx2=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0;

6/09/17 10:03 C:\Us...\AssemblingLocalStiffnessMatrix2.m 2 of 5 0; 0 ]; MEIzwy2=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIzwz2=[ 0; 6/L^2; 0; 0; 0; 2/L; 0; -6/L^2; 0; 0; 0; 4/L ]; %--- Esfuerzo Flector en el plano XZ [2] (EIy) MEIydx1=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIydy1=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIydz1=[ 0; 0; 12/L^3; 0; -6/L^2; 0; 0; 0; -12/L^3; 0; -6/L^2; 0 ]; MEIywx1=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIywy1=[ 0; 0; -6/L^2; 0; 4/L; 0; 0; 0; 6/L^2; 0; 2/L; 0 ]; MEIywz1=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIydx2=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIydy2=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIydz2=[ 0; 0; -12/L^3; 0; 6/L^2; 0; 0; 0; 12/L^3; 0; 6/L^2; 0 ]; MEIywx2=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIywy2=[ 0; 0; -6/L^2; 0; 2/L; 0; 0; 0; 6/L^2; 0; 4/L; 0 ]; MEIywz2=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; %--- Esfuerzo Cortante en el plano XY [1] (EIzQ) MEIzQdx1=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIzQdy1=[ 0; -12/L^3; 0; 0; 0; -6/L^2; 0; 12/L^3; 0; 0; 0; -6/L^2]; MEIzQdz1=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIzQwx1=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIzQwy1=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIzQwz1=[ 0; -6/L^2; 0; 0; 0; -3/L; 0; 6/L^2; 0; 0; 0; -3/L ]; MEIzQdx2=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIzQdy2=[ 0; 12/L^3; 0; 0; 0; 6/L^2; 0; -12/L^3; 0; 0; 0; 6/L^2]; MEIzQdz2=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIzQwx2=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ];

6/09/17 10:03 C:\Us...\AssemblingLocalStiffnessMatrix2.m 3 of 5 MEIzQwy2=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIzQwz2=[ 0; -6/L^2; 0; 0; 0; -3/L; 0; 6/L^2; 0; 0; 0; -3/L ]; %--- Esfuerzo Cortante en el plano XZ [2] (EIyQ] MEIyQdx1=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIyQdy1=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIyQdz1=[ 0; 0; -12/L^3; 0; 6/L^2; 0; 0; 0; 12/L^3; 0; 6/L^2; 0 ]; MEIyQwx1=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIyQwy1=[ 0; 0; 6/L^2; 0; -3/L; 0; 0; 0; -6/L^2; 0; -3/L; 0 ]; MEIyQwz1=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIyQdx2=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIyQdy2=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIyQdz2=[ 0; 0; 12/L^3; 0; -6/L^2; 0; 0; 0; -12/L^3; 0; -6/L^2; 0 ]; MEIyQwx2=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MEIyQwy2=[ 0; 0; 6/L^2; 0; -2/L; 0; 0; 0; -6/L^2; 0; -4/L; 0 ]; MEIyQwz2=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; %--- Esfuerzo Torsor (GJ) MGJwx1=[ 0; 0; 0; 1/L; 0; 0; 0; 0; 0; -1/L; 0; 0 ]; MGJwy1=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MGJwz1=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MGJwx2=[ 0; 0; 0; -1/L; 0; 0; 0; 0; 0; 1/L; 0; 0 ]; MGJwy2=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; MGJwz2=[ 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0 ]; mm2=[meadx1 MEIzdx1 MEIydx1 MEAdy1 MEIzdy1 MEIydy1 MEAdz1 MEIzdz1 MEIydz1 MEIzwx1 MEIywx1 MGJwx1 MEIzwy1 MEIywy1 MGJwy1 MEIzwz1 MEIywz1 MGJwz1 MEIzQdx1 MEIyQdx1 MEIzQdy1 MEIyQdy1 MEIzQdz1 MEIyQdz1 MEIzQwx1 MEIyQwx1 MEIzQwy1 MEIyQwy1 MEIzQwz1 MEIyQwz1 MEAdx2 MEIzdx2 MEIydx2 MEAdy2 MEIzdy2 MEIydy2 MEAdz2 MEIzdz2 MEIydz2 MEIzwx2 MEIywx2 MGJwx2 MEIzwy2 MEIywy2 MGJwy2 MEIzwz2 MEIywz2 MGJwz2 MEIzQdx2 MEIyQdx2 MEIzQdy2 MEIyQdy2 MEIzQdz2 MEIyQdz2 MEIzQwx2 MEIyQwx2 MEIzQwy2 MEIyQwy2 MEIzQwz2 MEIyQwz2];

6/09/17 10:03 C:\Us...\AssemblingLocalStiffnessMatrix2.m 4 of 5 % % %--- Esfuerzo axil (EA) % MEAdx1=[ 1/L; 0; 0; 0; 0; 0; -1/L; 0; 0; 0; 0; 0]; % MEAdx2=[ -1/L; 0; 0; 0; 0; 0; 1/L; 0; 0; 0; 0; 0]; % % %--- Esfuerzo flector (EI) % MEIdy1=[ 0; 12/L^3; 0; 0; 0; 6/L^2; 0; -12/L^3; 0; 0; 0; 6/L^2]; % MEIdz1=[ 0; 0; 12/L^3; 0; -6/L^2; 0; 0; 0; -12/L^3; 0; -6/L^2; 0 ]; % MEIwy1=[ 0; 0; -6/L^2; 0; 4/L; 0; 0; 0; 6/L^2; 0; 2/L; 0 ]; % MEIwz1=[ 0; 6/L^2; 0; 0; 0; 4/L; 0; -6/L^2; 0; 0; 0; 2/L ]; % MEIdy2=[ 0; -12/L^3; 0; 0; 0; -6/L^2; 0; 12/L^3; 0; 0; 0; -6/L^2]; % MEIdz2=[ 0; 0; -12/L^3; 0; 6/L^2; 0; 0; 0; 12/L^3; 0; 6/L^2; 0 ]; % MEIwy2=[ 0; 0; -6/L^2; 0; 2/L; 0; 0; 0; 6/L^2; 0; 4/L; 0 ]; % MEIwz2=[ 0; 6/L^2; 0; 0; 0; 2/L; 0; -6/L^2; 0; 0; 0; 4/L ]; % % %--- Esfuerzo cortante (EIQ) % MEIQdy1=[ 0; -12/L^3; 0; 0; 0; -6/L^2; 0; 12/L^3; 0; 0; 0; -6/L^2]; % MEIQdz1=[ 0; 0; 12/L^3; 0; -6/L^2; 0; 0; 0; -12/L^3; 0; -6/L^2; 0 ]; % MEIQwy1=[ 0; 0; -6/L^2; 0; 3/L; 0; 0; 0; 6/L^2; 0; 3/L; 0 ]; % MEIQwz1=[ 0; -6/L^2; 0; 0; 0; -3/L; 0; 6/L^2; 0; 0; 0; -3/L ]; % MEIQdy2=[ 0; 12/L^3; 0; 0; 0; 6/L^2; 0; -12/L^3; 0; 0; 0; 6/L^2]; % MEIQdz2=[ 0; 0; -12/L^3; 0; 6/L^2; 0; 0; 0; 12/L^3; 0; 6/L^2; 0 ]; % MEIQwy2=[ 0; 0; -6/L^2; 0; 2/L; 0; 0; 0; 6/L^2; 0; 4/L; 0 ]; % MEIQwz2=[ 0; -6/L^2; 0; 0; 0; -3/L; 0; 6/L^2; 0; 0; 0; -3/L ]; % % %--- Esfuerzo torsor (GJ) % MGJwx1=[ 0; 0; 0; 1/L; 0; 0; 0; 0; 0; -1 /L; 0; 0 ]; % MGJwx2=[ 0; 0; 0; -1/L; 0; 0; 0; 0; 0; 1/L; 0; 0 ]; % % mm=[meadx MEIdy1 MEIdz1 MEIwy1 MEIwz1 MEIQdy1 MEIQdz1 MEIQwy1 MEIQwz1 MGJwx1 % MEAdx2 MEIdy2 MEIdz2 MEIwy2 MEIwz2 MEIQdy2 MEIQdz2 MEIQwy2 MEIQwz2 % MGJwx2]

6/09/17 10:03 C:\Us...\AssemblingLocalStiffnessMatrix2.m 5 of 5

6/09/17 10:28 C:\Users\cami...\ForcesandDisplacements2.m 1 of 1 function [ForcesNames,DisplaNames]=ForcesandDisplacements2(nnodes) global knowndxdydzwxwywz ForcesNames=cell(6*nnodes,1); %Forces defined as a matrix (6x1) Displacements=cell(6*nnodes,1); %Displacements defined as a matrix (6x1) %--- Create the variables with Forces and Displacements. ind=1; k=1; for node=1:nnodes pos=6*node-5; ForcesNames{pos}=['Rx' sprintf('%04.0f',node)]; ForcesNames{pos+1}=['Ry' sprintf('%04.0f',node)]; ForcesNames{pos+2}=['Rz' sprintf('%04.0f',node)]; ForcesNames{pos+3}=['Mx' sprintf('%04.0f',node)]; ForcesNames{pos+4}=['My' sprintf('%04.0f',node)]; ForcesNames{pos+5}=['Mz' sprintf('%04.0f',node)]; Displacements{pos}=['dx' sprintf('%04.0f',node)]; Displacements{pos+1}=['dy' sprintf('%04.0f',node)]; Displacements{pos+2}=['dz' sprintf('%04.0f',node)]; Displacements{pos+3}=['wx' sprintf('%04.0f',node)]; Displacements{pos+4}=['wy' sprintf('%04.0f',node)]; Displacements{pos+5}=['wz' sprintf('%04.0f',node)]; for j=1:6 pos=find(node==knowndxdydzwxwywz{j,:}); if isempty(pos) DisplaNames{k,1}=Displacements{ind}; k=k+1

Estudi del procés constructiu de ponts atirantats sobre suports Autor: Joan Fraile Diana Annex 3 Resultats càlcul estructural amb Midas Civil iii

Reaction(Global) Node Load FX (kn) FY (kn) FZ (kn) MX (kn*m) MY (kn*m) MZ (kn*m) 1 TL 0 0 440,520566 0 0 0 12 TL 0 0 4159,383511 0 0 0 36 TL 0 0 5039,791444 0 0 0 60 TL 0 0 5011,613038 0 0 0 84 TL 0 0 4333,755271 0 0 0 100 TL 0 0 2619,955332 0 0 0 116 TL 0 0 4333,432466 0 0 0 140 TL 0 0 5012,720162 0 0 0 164 TL 0 0 5035,693731 0 0 0 188 TL 0 0 4204,419117 0 0 0 200 TL 0 0 808,715362 0 0 0 SUMMATION OF REACTION FORCES PRINTOUT Load FX (kn) FY (kn) FZ (kn) TL 0 0 41000

Beam Force Elem Load Part Axial (kn) Shear-y (kn) Shear-z (kn) Torsion (kn*m) Moment-y (kn*m) Moment-z (kn*m) 1 TL I[1] 0 0-440,52 0 0 0 1 TL J[2] 0 0-235,52 0 338,02 0 2 TL I[2] 0 0-235,52 0 338,02 0 2 TL J[3] 0 0-30,52 0 471,04 0 3 TL I[3] 0 0-30,52 0 471,04 0 3 TL J[4] 0 0 174,48 0 399,06 0 4 TL I[4] 0 0 174,48 0 399,06 0 4 TL J[5] 0 0 379,48 0 122,08 0 5 TL I[5] 0 0 379,48 0 122,08 0 5 TL J[6] 0 0 584,48 0-359,9 0 6 TL I[6] 0 0 584,48 0-359,9 0 6 TL J[7] 0 0 789,48 0-1046,88 0 7 TL I[7] 0 0 789,48 0-1046,88 0 7 TL J[8] 0 0 994,48 0-1938,86 0 8 TL I[8] 0 0 994,48 0-1938,86 0 8 TL J[9] 0 0 1199,48 0-3035,84 0 9 TL I[9] 0 0 1199,48 0-3035,84 0 9 TL J[10] 0 0 1404,48 0-4337,81 0 10 TL I[10] 0 0 1404,48 0-4337,81 0

10 TL J[11] 0 0 1609,48 0-5844,79 0 11 TL I[11] 0 0 1609,48 0-5844,79 0 11 TL J[12] 0 0 1814,48 0-7556,77 0 12 TL I[12] 0 0-2344,9 0-7556,77 0 12 TL J[13] 0 0-2139,9 0-5314,37 0 13 TL I[13] 0 0-2139,9 0-5314,37 0 13 TL J[14] 0 0-1934,9 0-3276,97 0 14 TL I[14] 0 0-1934,9 0-3276,97 0 14 TL J[15] 0 0-1729,9 0-1444,56 0 15 TL I[15] 0 0-1729,9 0-1444,56 0 15 TL J[16] 0 0-1524,9 0 182,84 0 16 TL I[16] 0 0-1524,9 0 182,84 0 16 TL J[17] 0 0-1319,9 0 1605,25 0 17 TL I[17] 0 0-1319,9 0 1605,25 0 17 TL J[18] 0 0-1114,9 0 2822,65 0 18 TL I[18] 0 0-1114,9 0 2822,65 0 18 TL J[19] 0 0-909,9 0 3835,05 0 19 TL I[19] 0 0-909,9 0 3835,05 0 19 TL J[20] 0 0-704,9 0 4642,46 0 20 TL I[20] 0 0-704,9 0 4642,46 0 20 TL J[21] 0 0-499,9 0 5244,86 0 21 TL I[21] 0 0-499,9 0 5244,86 0 21 TL J[22] 0 0-294,9 0 5642,27 0 22 TL I[22] 0 0-294,9 0 5642,27 0 22 TL J[23] 0 0-89,9 0 5834,67 0 23 TL I[23] 0 0-89,9 0 5834,67 0 23 TL J[24] 0 0 115,1 0 5822,08 0 24 TL I[24] 0 0 115,1 0 5822,08 0 24 TL J[25] 0 0 320,1 0 5604,48 0 25 TL I[25] 0 0 320,1 0 5604,48 0 25 TL J[26] 0 0 525,1 0 5181,88 0 26 TL I[26] 0 0 525,1 0 5181,88 0 26 TL J[27] 0 0 730,1 0 4554,29 0

27 TL I[27] 0 0 730,1 0 4554,29 0 27 TL J[28] 0 0 935,1 0 3721,69 0 28 TL I[28] 0 0 935,1 0 3721,69 0 28 TL J[29] 0 0 1140,1 0 2684,1 0 29 TL I[29] 0 0 1140,1 0 2684,1 0 29 TL J[30] 0 0 1345,1 0 1441,5 0 30 TL I[30] 0 0 1345,1 0 1441,5 0 30 TL J[31] 0 0 1550,1 0-6,1 0 31 TL I[31] 0 0 1550,1 0-6,1 0 31 TL J[32] 0 0 1755,1 0-1658,69 0 32 TL I[32] 0 0 1755,1 0-1658,69 0 32 TL J[33] 0 0 1960,1 0-3516,29 0 33 TL I[33] 0 0 1960,1 0-3516,29 0 33 TL J[34] 0 0 2165,1 0-5578,88 0 34 TL I[34] 0 0 2165,1 0-5578,88 0 34 TL J[35] 0 0 2370,1 0-7846,48 0 35 TL I[35] 0 0 2370,1 0-7846,48 0 35 TL J[36] 0 0 2575,1 0-10319,08 0 36 TL I[36] 0 0-2464,7 0-10319,08 0 36 TL J[37] 0 0-2259,7 0-7956,88 0 37 TL I[37] 0 0-2259,7 0-7956,88 0 37 TL J[38] 0 0-2054,7 0-5799,68 0 38 TL I[38] 0 0-2054,7 0-5799,68 0 38 TL J[39] 0 0-1849,7 0-3847,49 0 39 TL I[39] 0 0-1849,7 0-3847,49 0 39 TL J[40] 0 0-1644,7 0-2100,29 0 40 TL I[40] 0 0-1644,7 0-2100,29 0 40 TL J[41] 0 0-1439,7 0-558,1 0 41 TL I[41] 0 0-1439,7 0-558,1 0 41 TL J[42] 0 0-1234,7 0 779,1 0 42 TL I[42] 0 0-1234,7 0 779,1 0 42 TL J[43] 0 0-1029,7 0 1911,29 0 43 TL I[43] 0 0-1029,7 0 1911,29 0

43 TL J[44] 0 0-824,7 0 2838,49 0 44 TL I[44] 0 0-824,7 0 2838,49 0 44 TL J[45] 0 0-619,7 0 3560,68 0 45 TL I[45] 0 0-619,7 0 3560,68 0 45 TL J[46] 0 0-414,7 0 4077,88 0 46 TL I[46] 0 0-414,7 0 4077,88 0 46 TL J[47] 0 0-209,7 0 4390,07 0 47 TL I[47] 0 0-209,7 0 4390,07 0 47 TL J[48] 0 0-4,7 0 4497,27 0 48 TL I[48] 0 0-4,7 0 4497,27 0 48 TL J[49] 0 0 200,3 0 4399,47 0 49 TL I[49] 0 0 200,3 0 4399,47 0 49 TL J[50] 0 0 405,3 0 4096,66 0 50 TL I[50] 0 0 405,3 0 4096,66 0 50 TL J[51] 0 0 610,3 0 3588,86 0 51 TL I[51] 0 0 610,3 0 3588,86 0 51 TL J[52] 0 0 815,3 0 2876,05 0 52 TL I[52] 0 0 815,3 0 2876,05 0 52 TL J[53] 0 0 1020,3 0 1958,25 0 53 TL I[53] 0 0 1020,3 0 1958,25 0 53 TL J[54] 0 0 1225,3 0 835,44 0 54 TL I[54] 0 0 1225,3 0 835,44 0 54 TL J[55] 0 0 1430,3 0-492,36 0 55 TL I[55] 0 0 1430,3 0-492,36 0 55 TL J[56] 0 0 1635,3 0-2025,17 0 56 TL I[56] 0 0 1635,3 0-2025,17 0 56 TL J[57] 0 0 1840,3 0-3762,97 0 57 TL I[57] 0 0 1840,3 0-3762,97 0 57 TL J[58] 0 0 2045,3 0-5705,77 0 58 TL I[58] 0 0 2045,3 0-5705,77 0 58 TL J[59] 0 0 2250,3 0-7853,58 0 59 TL I[59] 0 0 2250,3 0-7853,58 0 59 TL J[60] 0 0 2455,3 0-10206,38 0

60 TL I[60] 0 0-2556,31 0-10206,38 0 60 TL J[61] 0 0-2351,31 0-7752,57 0 61 TL I[61] 0 0-2351,31 0-7752,57 0 61 TL J[62] 0 0-2146,31 0-5503,77 0 62 TL I[62] 0 0-2146,31 0-5503,77 0 62 TL J[63] 0 0-1941,31 0-3459,96 0 63 TL I[63] 0 0-1941,31 0-3459,96 0 63 TL J[64] 0 0-1736,31 0-1621,15 0 64 TL I[64] 0 0-1736,31 0-1621,15 0 64 TL J[65] 0 0-1531,31 0 12,66 0 65 TL I[65] 0 0-1531,31 0 12,66 0 65 TL J[66] 0 0-1326,31 0 1441,47 0 66 TL I[66] 0 0-1326,31 0 1441,47 0 66 TL J[67] 0 0-1121,31 0 2665,28 0 67 TL I[67] 0 0-1121,31 0 2665,28 0 67 TL J[68] 0 0-916,31 0 3684,09 0 68 TL I[68] 0 0-916,31 0 3684,09 0 68 TL J[69] 0 0-711,31 0 4497,89 0 69 TL I[69] 0 0-711,31 0 4497,89 0 69 TL J[70] 0 0-506,31 0 5106,7 0 70 TL I[70] 0 0-506,31 0 5106,7 0 70 TL J[71] 0 0-301,31 0 5510,51 0 71 TL I[71] 0 0-301,31 0 5510,51 0 71 TL J[72] 0 0-96,31 0 5709,32 0 72 TL I[72] 0 0-96,31 0 5709,32 0 72 TL J[73] 0 0 108,69 0 5703,13 0 73 TL I[73] 0 0 108,69 0 5703,13 0 73 TL J[74] 0 0 313,69 0 5491,94 0 74 TL I[74] 0 0 313,69 0 5491,94 0 74 TL J[75] 0 0 518,69 0 5075,74 0 75 TL I[75] 0 0 518,69 0 5075,74 0 75 TL J[76] 0 0 723,69 0 4454,55 0 76 TL I[76] 0 0 723,69 0 4454,55 0

76 TL J[77] 0 0 928,69 0 3628,36 0 77 TL I[77] 0 0 928,69 0 3628,36 0 77 TL J[78] 0 0 1133,69 0 2597,17 0 78 TL I[78] 0 0 1133,69 0 2597,17 0 78 TL J[79] 0 0 1338,69 0 1360,98 0 79 TL I[79] 0 0 1338,69 0 1360,98 0 79 TL J[80] 0 0 1543,69 0-80,21 0 80 TL I[80] 0 0 1543,69 0-80,21 0 80 TL J[81] 0 0 1748,69 0-1726,4 0 81 TL I[81] 0 0 1748,69 0-1726,4 0 81 TL J[82] 0 0 1953,69 0-3577,6 0 82 TL I[82] 0 0 1953,69 0-3577,6 0 82 TL J[83] 0 0 2158,69 0-5633,79 0 83 TL I[83] 0 0 2158,69 0-5633,79 0 83 TL J[84] 0 0 2363,69 0-7894,98 0 84 TL I[84] 0 0-1970,06 0-7894,98 0 84 TL J[85] 0 0-1765,06 0-6027,41 0 85 TL I[85] 0 0-1765,06 0-6027,41 0 85 TL J[86] 0 0-1560,06 0-4364,85 0 86 TL I[86] 0 0-1560,06 0-4364,85 0 86 TL J[87] 0 0-1355,06 0-2907,29 0 87 TL I[87] 0 0-1355,06 0-2907,29 0 87 TL J[88] 0 0-1150,06 0-1654,72 0 88 TL I[88] 0 0-1150,06 0-1654,72 0 88 TL J[89] 0 0-945,06 0-607,16 0 89 TL I[89] 0 0-945,06 0-607,16 0 89 TL J[90] 0 0-740,06 0 235,4 0 90 TL I[90] 0 0-740,06 0 235,4 0 90 TL J[91] 0 0-535,06 0 872,97 0 91 TL I[91] 0 0-535,06 0 872,97 0 91 TL J[92] 0 0-330,06 0 1305,53 0 92 TL I[92] 0 0-330,06 0 1305,53 0 92 TL J[93] 0 0-125,06 0 1533,1 0

93 TL I[93] 0 0-125,06 0 1533,1 0 93 TL J[94] 0 0 79,94 0 1555,66 0 94 TL I[94] 0 0 79,94 0 1555,66 0 94 TL J[95] 0 0 284,94 0 1373,22 0 95 TL I[95] 0 0 284,94 0 1373,22 0 95 TL J[96] 0 0 489,94 0 985,79 0 96 TL I[96] 0 0 489,94 0 985,79 0 96 TL J[97] 0 0 694,94 0 393,35 0 97 TL I[97] 0 0 694,94 0 393,35 0 97 TL J[98] 0 0 899,94 0-404,08 0 98 TL I[98] 0 0 899,94 0-404,08 0 98 TL J[99] 0 0 1104,94 0-1406,52 0 99 TL I[99] 0 0 1104,94 0-1406,52 0 99 TL J[100] 0 0 1309,94 0-2613,96 0 100 TL I[100] 0 0-1310,02 0-2613,96 0 100 TL J[101] 0 0-1105,02 0-1406,44 0 101 TL I[101] 0 0-1105,02 0-1406,44 0 101 TL J[102] 0 0-900,02 0-403,92 0 102 TL I[102] 0 0-900,02 0-403,92 0 102 TL J[103] 0 0-695,02 0 393,6 0 103 TL I[103] 0 0-695,02 0 393,6 0 103 TL J[104] 0 0-490,02 0 986,12 0 104 TL I[104] 0 0-490,02 0 986,12 0 104 TL J[105] 0 0-285,02 0 1373,64 0 105 TL I[105] 0 0-285,02 0 1373,64 0 105 TL J[106] 0 0-80,02 0 1556,16 0 106 TL I[106] 0 0-80,02 0 1556,16 0 106 TL J[107] 0 0 124,98 0 1533,68 0 107 TL I[107] 0 0 124,98 0 1533,68 0 107 TL J[108] 0 0 329,98 0 1306,2 0 108 TL I[108] 0 0 329,98 0 1306,2 0 108 TL J[109] 0 0 534,98 0 873,72 0 109 TL I[109] 0 0 534,98 0 873,72 0

109 TL J[110] 0 0 739,98 0 236,23 0 110 TL I[110] 0 0 739,98 0 236,23 0 110 TL J[111] 0 0 944,98 0-606,25 0 111 TL I[111] 0 0 944,98 0-606,25 0 111 TL J[112] 0 0 1149,98 0-1653,73 0 112 TL I[112] 0 0 1149,98 0-1653,73 0 112 TL J[113] 0 0 1354,98 0-2906,21 0 113 TL I[113] 0 0 1354,98 0-2906,21 0 113 TL J[114] 0 0 1559,98 0-4363,69 0 114 TL I[114] 0 0 1559,98 0-4363,69 0 114 TL J[115] 0 0 1764,98 0-6026,17 0 115 TL I[115] 0 0 1764,98 0-6026,17 0 115 TL J[116] 0 0 1969,98 0-7893,65 0 116 TL I[116] 0 0-2363,45 0-7893,65 0 116 TL J[117] 0 0-2158,45 0-5632,7 0 117 TL I[117] 0 0-2158,45 0-5632,7 0 117 TL J[118] 0 0-1953,45 0-3576,75 0 118 TL I[118] 0 0-1953,45 0-3576,75 0 118 TL J[119] 0 0-1748,45 0-1725,8 0 119 TL I[119] 0 0-1748,45 0-1725,8 0 119 TL J[120] 0 0-1543,45 0-79,84 0 120 TL I[120] 0 0-1543,45 0-79,84 0 120 TL J[121] 0 0-1338,45 0 1361,11 0 121 TL I[121] 0 0-1338,45 0 1361,11 0 121 TL J[122] 0 0-1133,45 0 2597,06 0 122 TL I[122] 0 0-1133,45 0 2597,06 0 122 TL J[123] 0 0-928,45 0 3628,01 0 123 TL I[123] 0 0-928,45 0 3628,01 0 123 TL J[124] 0 0-723,45 0 4453,96 0 124 TL I[124] 0 0-723,45 0 4453,96 0 124 TL J[125] 0 0-518,45 0 5074,91 0 125 TL I[125] 0 0-518,45 0 5074,91 0 125 TL J[126] 0 0-313,45 0 5490,87 0

126 TL I[126] 0 0-313,45 0 5490,87 0 126 TL J[127] 0 0-108,45 0 5701,82 0 127 TL I[127] 0 0-108,45 0 5701,82 0 127 TL J[128] 0 0 96,55 0 5707,77 0 128 TL I[128] 0 0 96,55 0 5707,77 0 128 TL J[129] 0 0 301,55 0 5508,72 0 129 TL I[129] 0 0 301,55 0 5508,72 0 129 TL J[130] 0 0 506,55 0 5104,67 0 130 TL I[130] 0 0 506,55 0 5104,67 0 130 TL J[131] 0 0 711,55 0 4495,62 0 131 TL I[131] 0 0 711,55 0 4495,62 0 131 TL J[132] 0 0 916,55 0 3681,58 0 132 TL I[132] 0 0 916,55 0 3681,58 0 132 TL J[133] 0 0 1121,55 0 2662,53 0 133 TL I[133] 0 0 1121,55 0 2662,53 0 133 TL J[134] 0 0 1326,55 0 1438,48 0 134 TL I[134] 0 0 1326,55 0 1438,48 0 134 TL J[135] 0 0 1531,55 0 9,43 0 135 TL I[135] 0 0 1531,55 0 9,43 0 135 TL J[136] 0 0 1736,55 0-1624,62 0 136 TL I[136] 0 0 1736,55 0-1624,62 0 136 TL J[137] 0 0 1941,55 0-3463,67 0 137 TL I[137] 0 0 1941,55 0-3463,67 0 137 TL J[138] 0 0 2146,55 0-5507,71 0 138 TL I[138] 0 0 2146,55 0-5507,71 0 138 TL J[139] 0 0 2351,55 0-7756,76 0 139 TL I[139] 0 0 2351,55 0-7756,76 0 139 TL J[140] 0 0 2556,55 0-10210,81 0 140 TL I[140] 0 0-2456,17 0-10210,81 0 140 TL J[141] 0 0-2251,17 0-7857,14 0 141 TL I[141] 0 0-2251,17 0-7857,14 0 141 TL J[142] 0 0-2046,17 0-5708,47 0 142 TL I[142] 0 0-2046,17 0-5708,47 0

142 TL J[143] 0 0-1841,17 0-3764,8 0 143 TL I[143] 0 0-1841,17 0-3764,8 0 143 TL J[144] 0 0-1636,17 0-2026,12 0 144 TL I[144] 0 0-1636,17 0-2026,12 0 144 TL J[145] 0 0-1431,17 0-492,45 0 145 TL I[145] 0 0-1431,17 0-492,45 0 145 TL J[146] 0 0-1226,17 0 836,22 0 146 TL I[146] 0 0-1226,17 0 836,22 0 146 TL J[147] 0 0-1021,17 0 1959,89 0 147 TL I[147] 0 0-1021,17 0 1959,89 0 147 TL J[148] 0 0-816,17 0 2878,56 0 148 TL I[148] 0 0-816,17 0 2878,56 0 148 TL J[149] 0 0-611,17 0 3592,24 0 149 TL I[149] 0 0-611,17 0 3592,24 0 149 TL J[150] 0 0-406,17 0 4100,91 0 150 TL I[150] 0 0-406,17 0 4100,91 0 150 TL J[151] 0 0-201,17 0 4404,58 0 151 TL I[151] 0 0-201,17 0 4404,58 0 151 TL J[152] 0 0 3,83 0 4503,25 0 152 TL I[152] 0 0 3,83 0 4503,25 0 152 TL J[153] 0 0 208,83 0 4396,92 0 153 TL I[153] 0 0 208,83 0 4396,92 0 153 TL J[154] 0 0 413,83 0 4085,59 0 154 TL I[154] 0 0 413,83 0 4085,59 0 154 TL J[155] 0 0 618,83 0 3569,27 0 155 TL I[155] 0 0 618,83 0 3569,27 0 155 TL J[156] 0 0 823,83 0 2847,94 0 156 TL I[156] 0 0 823,83 0 2847,94 0 156 TL J[157] 0 0 1028,83 0 1921,61 0 157 TL I[157] 0 0 1028,83 0 1921,61 0 157 TL J[158] 0 0 1233,83 0 790,28 0 158 TL I[158] 0 0 1233,83 0 790,28 0 158 TL J[159] 0 0 1438,83 0-546,05 0

159 TL I[159] 0 0 1438,83 0-546,05 0 159 TL J[160] 0 0 1643,83 0-2087,38 0 160 TL I[160] 0 0 1643,83 0-2087,38 0 160 TL J[161] 0 0 1848,83 0-3833,7 0 161 TL I[161] 0 0 1848,83 0-3833,7 0 161 TL J[162] 0 0 2053,83 0-5785,03 0 162 TL I[162] 0 0 2053,83 0-5785,03 0 162 TL J[163] 0 0 2258,83 0-7941,36 0 163 TL I[163] 0 0 2258,83 0-7941,36 0 163 TL J[164] 0 0 2463,83 0-10302,69 0 164 TL I[164] 0 0-2571,87 0-10302,69 0 164 TL J[165] 0 0-2366,87 0-7833,32 0 165 TL I[165] 0 0-2366,87 0-7833,32 0 165 TL J[166] 0 0-2161,87 0-5568,96 0 166 TL I[166] 0 0-2161,87 0-5568,96 0 166 TL J[167] 0 0-1956,87 0-3509,59 0 167 TL I[167] 0 0-1956,87 0-3509,59 0 167 TL J[168] 0 0-1751,87 0-1655,23 0 168 TL I[168] 0 0-1751,87 0-1655,23 0 168 TL J[169] 0 0-1546,87 0-5,86 0 169 TL I[169] 0 0-1546,87 0-5,86 0 169 TL J[170] 0 0-1341,87 0 1438,5 0 170 TL I[170] 0 0-1341,87 0 1438,5 0 170 TL J[171] 0 0-1136,87 0 2677,87 0 171 TL I[171] 0 0-1136,87 0 2677,87 0 171 TL J[172] 0 0-931,87 0 3712,24 0 172 TL I[172] 0 0-931,87 0 3712,24 0 172 TL J[173] 0 0-726,87 0 4541,6 0 173 TL I[173] 0 0-726,87 0 4541,6 0 173 TL J[174] 0 0-521,87 0 5165,97 0 174 TL I[174] 0 0-521,87 0 5165,97 0 174 TL J[175] 0 0-316,87 0 5585,33 0 175 TL I[175] 0 0-316,87 0 5585,33 0

175 TL J[176] 0 0-111,87 0 5799,7 0 176 TL I[176] 0 0-111,87 0 5799,7 0 176 TL J[177] 0 0 93,13 0 5809,06 0 177 TL I[177] 0 0 93,13 0 5809,06 0 177 TL J[178] 0 0 298,13 0 5613,43 0 178 TL I[178] 0 0 298,13 0 5613,43 0 178 TL J[179] 0 0 503,13 0 5212,79 0 179 TL I[179] 0 0 503,13 0 5212,79 0 179 TL J[180] 0 0 708,13 0 4607,16 0 180 TL I[180] 0 0 708,13 0 4607,16 0 180 TL J[181] 0 0 913,13 0 3796,53 0 181 TL I[181] 0 0 913,13 0 3796,53 0 181 TL J[182] 0 0 1118,13 0 2780,89 0 182 TL I[182] 0 0 1118,13 0 2780,89 0 182 TL J[183] 0 0 1323,13 0 1560,26 0 183 TL I[183] 0 0 1323,13 0 1560,26 0 183 TL J[184] 0 0 1528,13 0 134,62 0 184 TL I[184] 0 0 1528,13 0 134,62 0 184 TL J[185] 0 0 1733,13 0-1496,01 0 185 TL I[185] 0 0 1733,13 0-1496,01 0 185 TL J[186] 0 0 1938,13 0-3331,65 0 186 TL I[186] 0 0 1938,13 0-3331,65 0 186 TL J[187] 0 0 2143,13 0-5372,28 0 187 TL I[187] 0 0 2143,13 0-5372,28 0 187 TL J[188] 0 0 2348,13 0-7617,92 0 188 TL I[188] 0 0-1856,28 0-7617,92 0 188 TL J[189] 0 0-1651,28 0-5864,13 0 189 TL I[189] 0 0-1651,28 0-5864,13 0 189 TL J[190] 0 0-1446,28 0-4315,35 0 190 TL I[190] 0 0-1446,28 0-4315,35 0 190 TL J[191] 0 0-1241,28 0-2971,56 0 191 TL I[191] 0 0-1241,28 0-2971,56 0 191 TL J[192] 0 0-1036,28 0-1832,78 0

192 TL I[192] 0 0-1036,28 0-1832,78 0 192 TL J[193] 0 0-831,28 0-898,99 0 193 TL I[193] 0 0-831,28 0-898,99 0 193 TL J[194] 0 0-626,28 0-170,21 0 194 TL I[194] 0 0-626,28 0-170,21 0 194 TL J[195] 0 0-421,28 0 353,58 0 195 TL I[195] 0 0-421,28 0 353,58 0 195 TL J[196] 0 0-216,28 0 672,36 0 196 TL I[196] 0 0-216,28 0 672,36 0 196 TL J[197] 0 0-11,28 0 786,15 0 197 TL I[197] 0 0-11,28 0 786,15 0 197 TL J[198] 0 0 193,72 0 694,93 0 198 TL I[198] 0 0 193,72 0 694,93 0 198 TL J[199] 0 0 398,72 0 398,72 0 199 TL I[199] 0 0 398,72 0 398,72 0 199 TL J[200] 0 0 603,72 0-102,5 0 200 TL I[200] 0 0-205 0-102,5 0 200 TL J[201] 0 0 0 0 0 0

Barcelona, 20 de Setembre de 2017