1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DEBUT DE LA PREMIERE FENETRE %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function param_user
% Création de l'objet Figure (fenêtre)
figure('units','pixels',...
'position',[350 200 500 500],...
'color','w',...
'numbertitle','off',...
'name','Variables paramétrables pour le treillis de Pratt',...
'menubar','none',...
'tag','param1');
%%% Création des différents points à demander
%Nombre de mailles
uicontrol('style','text',...
'units','normalized',...
'position',[0.2 0.7 0.3 0.05],...
'FontUnits','points',...
'fontsize',10,...
'string','Nombre de mailles:');
%Longueur du pont[m]
uicontrol('style','text',...
'units','normalized',...
'position',[0.2 0.6 0.3 0.05],...
'FontUnits','points',...
'fontsize',10,...
'string','Longueur du pont[m]:');
%Hauteur du pont[m]
uicontrol('style','text',...
'units','normalized',...
'position',[0.2 0.5 0.3 0.05],...
'FontUnits','points',...
'fontsize',10,...
'string','Hauteur du pont[m]:');
%Section des barres[m²]
uicontrol('style','text',...
'units','normalized',...
'position',[0.2 0.4 0.3 0.05],...
'FontUnits','points',...
'fontsize',10,...
'string','Section des barres[m²]:');
%Nature des barres[GPa]
uicontrol('style','text',...
'units','normalized',...
'position',[0.2 0.3 0.3 0.05],...
'FontUnits','points',...
'fontsize',10,...
'string','Nature des barres[GPa]:');
%%%Création des cases à remplir
%%%Travail encore effectué que sur Longueur...
%Mailles
m=uicontrol('style','popupmenu',...
'units','normalized',...
'position',[0.5 0.7 0.1 0.05],...
'FontUnits','points',...
'fontsize',10,...
'tag','mm',...
'string',[2 6 10 14 18 22 26 30 34 38 42 46]);
%Longueur
saisieL=uicontrol('style','edit',...
'units','normalized',...
'position',[0.5 0.6 0.05 0.05],...
'FontUnits','points',...
'fontsize',10,...
'tag','LL',...
'string','0');
setappdata(gcf,'handleL',saisieL);%enregistrement de la valeur du handle
%Hauteur
h=uicontrol('style','edit',...
'units','normalized',...
'position',[0.5 0.5 0.05 0.05],...
'FontUnits','points',...
'fontsize',10,...
'tag','hh',...
'string','0');
%Section
S=uicontrol('style','edit',...
'units','normalized',...
'position',[0.5 0.4 0.05 0.05],...
'FontUnits','points',...
'fontsize',10,...
'tag','SS',...
'string','0');
%Nature
E=uicontrol('style','edit',...
'units','normalized',...
'position',[0.5 0.3 0.05 0.05],...
'FontUnits','points',...
'fontsize',10,...
'tag','EE',...
'string','0');
%%% Création du bouton qui permet de sauvegarder les valeurs
uicontrol('style','pushbutton',...
'units','normalized',...
'position',[0.3 0.1 0.1 0.05],...
'string','Save',...
'callback',@sauvegarde,...
'tag','save');
%%% Création du bouton suivant
uicontrol('style','pushbutton',...
'units','normalized',...
'position',[0.5 0.1 0.1 0.05],...
'string','Suivant',...
'callback',@param_calc,...
'tag','suivant1');
%%%Sauvegarde des valeurs introduites%%%
function sauvegarde(obj,event)
saisieL=getappdata(gcf,'handleL');
L=get(saisieL,'string');
%%%%%%%%%%%%%%%%%%%%%%%
%%% Deuxième fenêtre%%%
%%%%%%%%%%%%%%%%%%%%%%%
function[b,n,A,C,alpha,alpha_deg,beta,beta_deg]=param_calc(m,L,h,S,E)
% Création de l'objet Figure (fenêtre)
figure('units','pixels',...
'position',[350 200 500 500],...
'color','r',...
'numbertitle','off',...
'name','Variables paramétrables pour le treillis de Pratt',...
'menubar','none',...
'tag','param2'); |