[READ-ONLY] Mirror of https://github.com/jmrplens/EASEPostFile2Matlab. Representa los datos de historia temporal obtenidos con EASE 4 y calcula la teoría revisada corregida.
0

Configure Feed

Select the types of activity you want to include in your feed.

Add files via upload

authored by

Jose Manuel Requena Plens and committed by
GitHub
(Jun 3, 2018, 2:57 AM +0200) 1a6d32e2 e7b06884

+676
EASEPostFile2Matlab.fig

This is a binary file and will not be displayed.

+676
EASEPostFile2Matlab.m
··· 1 + function varargout = EASEPostFile2Matlab(varargin) 2 + % EASEPOSTFILE2MATLAB MATLAB code for EASEPostFile2Matlab.fig 3 + % EASEPOSTFILE2MATLAB, by itself, creates a new EASEPOSTFILE2MATLAB or raises the existing 4 + % singleton*. 5 + % 6 + % H = EASEPOSTFILE2MATLAB returns the handle to a new EASEPOSTFILE2MATLAB or the handle to 7 + % the existing singleton*. 8 + % 9 + % EASEPOSTFILE2MATLAB('CALLBACK',hObject,eventData,handles,...) calls the local 10 + % function named CALLBACK in EASEPOSTFILE2MATLAB.M with the given input arguments. 11 + % 12 + % EASEPOSTFILE2MATLAB('Property','Value',...) creates a new EASEPOSTFILE2MATLAB or raises the 13 + % existing singleton*. Starting from the left, property value pairs are 14 + % applied to the GUI before EASEPostFile2Matlab_OpeningFcn gets called. An 15 + % unrecognized property name or invalid value makes property application 16 + % stop. All inputs are passed to EASEPostFile2Matlab_OpeningFcn via varargin. 17 + % 18 + % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one 19 + % instance to run (singleton)". 20 + % 21 + % See also: GUIDE, GUIDATA, GUIHANDLES 22 + 23 + % Edit the above text to modify the response to help EASEPostFile2Matlab 24 + 25 + % Last Modified by GUIDE v2.5 18-Apr-2018 01:21:17 26 + 27 + % Begin initialization code - DO NOT EDIT 28 + gui_Singleton = 1; 29 + gui_State = struct('gui_Name', mfilename, ... 30 + 'gui_Singleton', gui_Singleton, ... 31 + 'gui_OpeningFcn', @EASEPostFile2Matlab_OpeningFcn, ... 32 + 'gui_OutputFcn', @EASEPostFile2Matlab_OutputFcn, ... 33 + 'gui_LayoutFcn', [] , ... 34 + 'gui_Callback', []); 35 + if nargin && ischar(varargin{1}) 36 + gui_State.gui_Callback = str2func(varargin{1}); 37 + end 38 + 39 + if nargout 40 + [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); 41 + else 42 + gui_mainfcn(gui_State, varargin{:}); 43 + end 44 + % End initialization code - DO NOT EDIT 45 + 46 + 47 + % --- Executes just before EASEPostFile2Matlab is made visible. 48 + function EASEPostFile2Matlab_OpeningFcn(hObject, eventdata, handles, varargin) 49 + % This function has no output args, see OutputFcn. 50 + % hObject handle to figure 51 + % eventdata reserved - to be defined in a future version of MATLAB 52 + % handles structure with handles and user data (see GUIDATA) 53 + % varargin command line arguments to EASEPostFile2Matlab (see VARARGIN) 54 + 55 + % Choose default command line output for EASEPostFile2Matlab 56 + handles.output = hObject; 57 + 58 + addpath('include') 59 + 60 + % Valor por defecto del tiempo de integracion 61 + handles.Rango = 50; % milisegundos 62 + 63 + % Textos de la ventana de carga 64 + handles.LPROGRESSTITLE = 'Progreso'; 65 + handles.LTIMEDAYS = 'dias'; 66 + handles.LTIMEHOURS = 'horas'; 67 + handles.LTIMEMINS = 'mins'; 68 + handles.LTIMESECS = 'segs'; 69 + handles.LTIMESEC = 'seg'; 70 + % Update handles structure 71 + guidata(hObject, handles); 72 + 73 + % UIWAIT makes EASEPostFile2Matlab wait for user response (see UIRESUME) 74 + % uiwait(handles.figure1); 75 + 76 + 77 + % --- Outputs from this function are returned to the command line. 78 + function varargout = EASEPostFile2Matlab_OutputFcn(hObject, eventdata, handles) 79 + % varargout cell array for returning output args (see VARARGOUT); 80 + % hObject handle to figure 81 + % eventdata reserved - to be defined in a future version of MATLAB 82 + % handles structure with handles and user data (see GUIDATA) 83 + 84 + % Get default command line output from handles structure 85 + varargout{1} = handles.output; 86 + 87 + 88 + % --- Executes on button press in botonRT. 89 + function botonRT_Callback(hObject, eventdata, handles) 90 + representaRT(handles) 91 + 92 + 93 + % --- Executes on selection change in listafuentes. 94 + function listafuentes_Callback(hObject, eventdata, handles) 95 + 96 + % --- Executes during object creation, after setting all properties. 97 + function listafuentes_CreateFcn(hObject, eventdata, handles) 98 + if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) 99 + set(hObject,'BackgroundColor','white'); 100 + end 101 + set(hObject,'string',[]) 102 + 103 + % --- Executes on selection change in listareceptores. 104 + function listareceptores_Callback(hObject, eventdata, handles) 105 + handles.Index = get(handles.listareceptores,'Value'); 106 + % Receptor 107 + set(handles.posicionreceptortexto,'String',... 108 + [num2str(handles.SPLm{handles.Index,5}(1)),'x',... 109 + num2str(handles.SPLm{handles.Index,5}(2)),'x',... 110 + num2str(handles.SPLm{handles.Index,5}(3))]) 111 + set(handles.tiempollegadatexto,'String',num2str(handles.SPLm{handles.Index,9})) 112 + set(handles.distanciafuentetexto,'String',num2str(handles.SPLm{handles.Index,6})) 113 + set(handles.rayosrecibidostexto,'String',num2str(handles.SPLm{handles.Index,8})) 114 + guidata(hObject, handles); 115 + 116 + % --- Executes during object creation, after setting all properties. 117 + function listareceptores_CreateFcn(hObject, eventdata, handles) 118 + if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) 119 + set(hObject,'BackgroundColor','white'); 120 + end 121 + set(hObject,'string',[]) 122 + 123 + 124 + % --- Executes on button press in botonrespuestafuente. 125 + function botonrespuestafuente_Callback(hObject, eventdata, handles) 126 + representaRespuesta(handles) 127 + 128 + 129 + % --- Executes on button press in botondirectividadfuente. 130 + function botondirectividadfuente_Callback(hObject, eventdata, handles) 131 + representaDirectividad(handles) 132 + 133 + 134 + % --- Executes on button press in botonplotear. 135 + function botonplotear_Callback(hObject, eventdata, handles) 136 + 137 + % Si esta marcada la opcion de SPL vs Distancia 138 + if get(handles.splVSdist,'Value')==1 139 + handles.Rango = str2double(get(handles.rangotemporal,'String')); 140 + % Muestra el mensaje de carga de representacion 141 + set(handles.cargandoPlot,'visible','on') 142 + if get(handles.doscampos,'value')==1 % Util/Perjudicial 143 + representarSPLvsDist2(hObject,handles) 144 + elseif get(handles.trescampos,'value')==1 % Directo/Early/Late 145 + representarSPLvsDist3(hObject,handles) 146 + end 147 + set(handles.cargandoPlot,'visible','off') 148 + end 149 + if get(handles.ecogramaBoton,'Value')==1 150 + representarEcograma(handles) 151 + end 152 + if get(handles.claridadboton,'Value')==1 153 + handles.Rango = str2double(get(handles.rangotemporal,'String')); 154 + set(handles.cargandoPlot,'visible','on') 155 + representarCt(hObject,handles) 156 + set(handles.cargandoPlot,'visible','off') 157 + end 158 + if get(handles.definicionboton,'Value')==1 159 + handles.Rango = str2double(get(handles.rangotemporal,'String')); 160 + set(handles.cargandoPlot,'visible','on') 161 + representarDt(hObject,handles) 162 + set(handles.cargandoPlot,'visible','off') 163 + end 164 + if get(handles.sonoridadboton,'Value')==1 165 + set(handles.cargandoPlot,'visible','on') 166 + representarG(hObject,handles) 167 + set(handles.cargandoPlot,'visible','off') 168 + end 169 + 170 + 171 + 172 + % --- Executes on button press in abrirnuevafigura. 173 + function abrirnuevafigura_Callback(hObject, eventdata, handles) 174 + % hObject handle to abrirnuevafigura (see GCBO) 175 + % eventdata reserved - to be defined in a future version of MATLAB 176 + % handles structure with handles and user data (see GUIDATA) 177 + 178 + 179 + % --- Executes on button press in botonExportar. 180 + function botonExportar_Callback(hObject, eventdata, handles) 181 + % hObject handle to botonExportar (see GCBO) 182 + % eventdata reserved - to be defined in a future version of MATLAB 183 + % handles structure with handles and user data (see GUIDATA) 184 + 185 + 186 + 187 + function rangotemporal_Callback(hObject, eventdata, handles) 188 + MaxElegible = handles.MaxElegible; 189 + Valor = str2double(get(hObject,'String')); 190 + set(hObject,'String',num2str(floor(Valor))) 191 + if str2double(get(hObject,'String')) > MaxElegible 192 + set(hObject,'String',num2str(floor(MaxElegible))) 193 + end 194 + if str2double(get(hObject,'String'))<2 195 + set(hObject,'String','2') 196 + end 197 + 198 + 199 + % --- Executes during object creation, after setting all properties. 200 + function rangotemporal_CreateFcn(hObject, eventdata, handles) 201 + % hObject handle to rangotemporal (see GCBO) 202 + % eventdata reserved - to be defined in a future version of MATLAB 203 + % handles empty - handles not created until after all CreateFcns called 204 + 205 + % Hint: edit controls usually have a white background on Windows. 206 + % See ISPC and COMPUTER. 207 + if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) 208 + set(hObject,'BackgroundColor','white'); 209 + end 210 + 211 + 212 + % --- Executes on button press in generarvideoboton. 213 + function generarvideoboton_Callback(hObject, eventdata, handles) 214 + % hObject handle to generarvideoboton (see GCBO) 215 + % eventdata reserved - to be defined in a future version of MATLAB 216 + % handles structure with handles and user data (see GUIDATA) 217 + 218 + % Hint: get(hObject,'Value') returns toggle state of generarvideoboton 219 + 220 + 221 + 222 + function limvideoms_Callback(hObject, eventdata, handles) 223 + MaxElegible = handles.MaxElegible; 224 + Valor = str2double(get(hObject,'String')); 225 + set(hObject,'String',num2str(floor(Valor))) 226 + if str2double(get(hObject,'String')) > MaxElegible 227 + set(hObject,'String',num2str(floor(MaxElegible))) 228 + end 229 + if str2double(get(hObject,'String'))==0 230 + set(hObject,'String','1') 231 + end 232 + 233 + 234 + % --- Executes during object creation, after setting all properties. 235 + function limvideoms_CreateFcn(hObject, eventdata, handles) 236 + % hObject handle to limvideoms (see GCBO) 237 + % eventdata reserved - to be defined in a future version of MATLAB 238 + % handles empty - handles not created until after all CreateFcns called 239 + 240 + % Hint: edit controls usually have a white background on Windows. 241 + % See ISPC and COMPUTER. 242 + if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) 243 + set(hObject,'BackgroundColor','white'); 244 + end 245 + 246 + 247 + % -------------------------------------------------------------------- 248 + function menuinicio_Callback(hObject, eventdata, handles) 249 + % hObject handle to menuinicio (see GCBO) 250 + % eventdata reserved - to be defined in a future version of MATLAB 251 + % handles structure with handles and user data (see GUIDATA) 252 + 253 + 254 + % -------------------------------------------------------------------- 255 + function botonleerarchivos_Callback(hObject, eventdata, handles) 256 + % Solicita los archivos 257 + [NombreArchivo,Ruta] = uigetfile(... 258 + '*.*',... 259 + 'Elige los archivos ''Post File''',... 260 + 'MultiSelect', 'on'); 261 + if isempty(NombreArchivo); return; end 262 + % Genera la ruta hacia los archivos 263 + for i=1:size(NombreArchivo,2) 264 + handles.ListaArchivos(i) = strcat(Ruta,NombreArchivo(i)); 265 + end 266 + 267 + UltimaCarpeta = find(Ruta==filesep,2,'last'); 268 + TituloCarpeta = Ruta(UltimaCarpeta(1):end); 269 + handles.figure1.Name = ['EASEPostFile2Matlab',' (...',TituloCarpeta,')']; 270 + 271 + % Importa los archivos 272 + importarPostFiles(hObject,handles) 273 + 274 + % Carga las nuevas variables 275 + handles = guidata(hObject); 276 + 277 + % Carga de datos inicial 278 + % Extraer cada ID de fuente diferente. Sirve para tener identificada cada 279 + % fuente y para conocer el numero de fuentes. 280 + handles.Fuentes = unique(handles.SPLm(:,2)); 281 + 282 + % Indice de inicio de cada fuente 283 + [~, handles.FuentesIni] = unique(handles.SPLm(:,2),'first'); 284 + % Indice de final de cada fuente 285 + [~, handles.FuentesFin] = unique(handles.SPLm(:,2),'last'); 286 + 287 + % Indice de los datos inicial 288 + handles.Index = 1; 289 + 290 + % Array de nombres de receptores 291 + handles.Receptores = handles.SPLm(... 292 + handles.FuentesIni(handles.Index):handles.FuentesFin(handles.Index),... 293 + 3); 294 + 295 + % Actualiza los valores mostrados en la aplicaci�n 296 + % Sala 297 + set(handles.volumentexto,'String',num2str(handles.SPLm{handles.Index,15})) 298 + set(handles.superficietexto,'String',num2str(handles.SPLm{handles.Index,16})) 299 + set(handles.temperaturatexto,'String',num2str(handles.SPLm{handles.Index,17})) 300 + set(handles.humedadtexto,'String',num2str(handles.SPLm{handles.Index,18})) 301 + % Fuente 302 + set(handles.posicionfuentetexto,'String',... 303 + [num2str(handles.SPLm{handles.Index,4}(1)),'x',... 304 + num2str(handles.SPLm{handles.Index,4}(2)),'x',... 305 + num2str(handles.SPLm{handles.Index,4}(3))]) 306 + set(handles.retardofuentetexto,'String',num2str(handles.SPLm{handles.Index,7})) 307 + % Receptor 308 + set(handles.posicionreceptortexto,'String',... 309 + [num2str(handles.SPLm{handles.Index,5}(1)),'x',... 310 + num2str(handles.SPLm{handles.Index,5}(2)),'x',... 311 + num2str(handles.SPLm{handles.Index,5}(3))]) 312 + set(handles.tiempollegadatexto,'String',num2str(handles.SPLm{handles.Index,9})) 313 + set(handles.distanciafuentetexto,'String',num2str(handles.SPLm{handles.Index,6})) 314 + set(handles.rayosrecibidostexto,'String',num2str(handles.SPLm{handles.Index,8})) 315 + % Lista receptores 316 + set(handles.listareceptores,'string',handles.Receptores) 317 + % Lista fuentes 318 + set(handles.listafuentes,'string',handles.Fuentes) 319 + 320 + % Actualiza el valor maximo elegible 321 + set(handles.ValMaxText,'String',num2str(floor(handles.MaxElegible))); 322 + 323 + 324 + % Mostrar detalles del programa 325 + set(handles.panelparametrossala,'visible','on') 326 + set(handles.panelfuente,'visible','on') 327 + set(handles.panellistafuentes,'visible','on') 328 + set(handles.panellistareceptores,'visible','on') 329 + set(handles.panelparametrosreceptor,'visible','on') 330 + set(handles.paneltemporal,'visible','on') 331 + set(handles.botonplotear,'visible','on') 332 + 333 + % Actualizar variables en la aplicacion 334 + guidata(hObject, handles); 335 + 336 + 337 + % --- Executes on button press in botonAbsorcion. 338 + function botonAbsorcion_Callback(hObject, eventdata, handles) 339 + representaAbsorcion(handles) 340 + 341 + 342 + % --- Executes on button press in teoriacorregida. 343 + function teoriacorregida_Callback(hObject, eventdata, handles) 344 + % hObject handle to teoriacorregida (see GCBO) 345 + % eventdata reserved - to be defined in a future version of MATLAB 346 + % handles structure with handles and user data (see GUIDATA) 347 + 348 + % Hint: get(hObject,'Value') returns toggle state of teoriacorregida 349 + 350 + 351 + 352 + function Qdir_Callback(hObject, eventdata, handles) 353 + %Valor = str2double(get(hObject,'String')); 354 + %set(hObject,'String',num2str(floor(Valor))) 355 + if str2double(get(hObject,'String')) < 1 356 + set(hObject,'String','1') 357 + end 358 + 359 + 360 + % --- Executes during object creation, after setting all properties. 361 + function Qdir_CreateFcn(hObject, eventdata, handles) 362 + % hObject handle to Qdir (see GCBO) 363 + % eventdata reserved - to be defined in a future version of MATLAB 364 + % handles empty - handles not created until after all CreateFcns called 365 + 366 + % Hint: edit controls usually have a white background on Windows. 367 + % See ISPC and COMPUTER. 368 + if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) 369 + set(hObject,'BackgroundColor','white'); 370 + end 371 + 372 + 373 + 374 + function numIntentos_Callback(hObject, eventdata, handles) 375 + Valor = str2double(get(hObject,'String')); 376 + set(hObject,'String',num2str(floor(Valor))) 377 + if str2double(get(hObject,'String')) < 10 378 + set(hObject,'String','10') 379 + end 380 + 381 + 382 + % --- Executes during object creation, after setting all properties. 383 + function numIntentos_CreateFcn(hObject, eventdata, handles) 384 + % hObject handle to numIntentos (see GCBO) 385 + % eventdata reserved - to be defined in a future version of MATLAB 386 + % handles empty - handles not created until after all CreateFcns called 387 + 388 + % Hint: edit controls usually have a white background on Windows. 389 + % See ISPC and COMPUTER. 390 + if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) 391 + set(hObject,'BackgroundColor','white'); 392 + end 393 + 394 + 395 + % --- Executes on button press in ecogramaBoton. 396 + function ecogramaBoton_Callback(hObject, eventdata, handles) 397 + % hObject handle to ecogramaBoton (see GCBO) 398 + % eventdata reserved - to be defined in a future version of MATLAB 399 + % handles structure with handles and user data (see GUIDATA) 400 + 401 + % Hint: get(hObject,'Value') returns toggle state of ecogramaBoton 402 + 403 + 404 + % -------------------------------------------------------------------- 405 + function botonimportarmat_Callback(hObject, eventdata, handles) 406 + % Solicita los archivos 407 + [NombreArchivo,Ruta] = uigetfile(... 408 + '*.mat',... 409 + 'Selecciona el archivo .mat'); 410 + 411 + Archivo = strcat(Ruta,NombreArchivo); 412 + 413 + DatosCargados = load(Archivo); 414 + 415 + UltimaCarpeta = find(Ruta==filesep,2,'last'); 416 + TituloCarpeta = Ruta(UltimaCarpeta(1):end); 417 + handles.figure1.Name = ['EASEPostFile2Matlab',' (...',TituloCarpeta,NombreArchivo,')']; 418 + 419 + handles.SPLm = DatosCargados.SPLm; 420 + handles.MaxElegible = DatosCargados.MaxElegible; 421 + 422 + % Carga de datos inicial 423 + % Extraer cada ID de fuente diferente. Sirve para tener identificada cada 424 + % fuente y para conocer el numero de fuentes. 425 + handles.Fuentes = unique(handles.SPLm(:,2)); 426 + 427 + % Indice de inicio de cada fuente 428 + [~, handles.FuentesIni] = unique(handles.SPLm(:,2),'first'); 429 + % Indice de final de cada fuente 430 + [~, handles.FuentesFin] = unique(handles.SPLm(:,2),'last'); 431 + 432 + % Indice de los datos inicial 433 + handles.Index = 1; 434 + 435 + % Array de nombres de receptores 436 + handles.Receptores = handles.SPLm(... 437 + handles.FuentesIni(handles.Index):handles.FuentesFin(handles.Index),... 438 + 3); 439 + 440 + % Actualiza los valores mostrados en la aplicaci�n 441 + % Sala 442 + set(handles.volumentexto,'String',num2str(handles.SPLm{handles.Index,15})) 443 + set(handles.superficietexto,'String',num2str(handles.SPLm{handles.Index,16})) 444 + set(handles.temperaturatexto,'String',num2str(handles.SPLm{handles.Index,17})) 445 + set(handles.humedadtexto,'String',num2str(handles.SPLm{handles.Index,18})) 446 + % Fuente 447 + set(handles.posicionfuentetexto,'String',... 448 + [num2str(handles.SPLm{handles.Index,4}(1)),'x',... 449 + num2str(handles.SPLm{handles.Index,4}(2)),'x',... 450 + num2str(handles.SPLm{handles.Index,4}(3))]) 451 + set(handles.retardofuentetexto,'String',num2str(handles.SPLm{handles.Index,7})) 452 + % Receptor 453 + set(handles.posicionreceptortexto,'String',... 454 + [num2str(handles.SPLm{handles.Index,5}(1)),'x',... 455 + num2str(handles.SPLm{handles.Index,5}(2)),'x',... 456 + num2str(handles.SPLm{handles.Index,5}(3))]) 457 + set(handles.tiempollegadatexto,'String',num2str(handles.SPLm{handles.Index,9})) 458 + set(handles.distanciafuentetexto,'String',num2str(handles.SPLm{handles.Index,6})) 459 + set(handles.rayosrecibidostexto,'String',num2str(handles.SPLm{handles.Index,8})) 460 + % Lista receptores 461 + set(handles.listareceptores,'string',handles.Receptores) 462 + % Lista fuentes 463 + set(handles.listafuentes,'string',handles.Fuentes) 464 + 465 + % Actualiza el valor maximo elegible 466 + set(handles.ValMaxText,'String',num2str(floor(handles.MaxElegible))); 467 + 468 + % Mostrar detalles del programa 469 + set(handles.panelparametrossala,'visible','on') 470 + set(handles.panelfuente,'visible','on') 471 + set(handles.panellistafuentes,'visible','on') 472 + set(handles.panellistareceptores,'visible','on') 473 + set(handles.panelparametrosreceptor,'visible','on') 474 + set(handles.paneltemporal,'visible','on') 475 + set(handles.botonplotear,'visible','on') 476 + 477 + % Actualizar variables en la aplicacion 478 + guidata(hObject, handles); 479 + 480 + 481 + % -------------------------------------------------------------------- 482 + function exportarmenu_Callback(hObject, eventdata, handles) 483 + % hObject handle to exportarmenu (see GCBO) 484 + % eventdata reserved - to be defined in a future version of MATLAB 485 + % handles structure with handles and user data (see GUIDATA) 486 + 487 + 488 + % -------------------------------------------------------------------- 489 + function exportmatboton_Callback(hObject, eventdata, handles) 490 + [file,path,~] = uiputfile({... 491 + '*.mat','MAT-files (*.mat)'; % 1 - JPEG 492 + },'Guardar datos','Datos.mat'); 493 + 494 + if file==0; return; end 495 + SPLm=handles.SPLm; 496 + MaxElegible = handles.MaxElegible; 497 + % Guarda los datos importados de los TXT en .mat 498 + save([path,file],'SPLm','MaxElegible') 499 + 500 + % Si se ha calculado la teoria revisada se exportan el resto de datos 501 + if isfield(handles,'Elate') 502 + 503 + % Coeficientes 504 + eL = handles.Elate; 505 + CL = handles.Clate; 506 + eE = handles.Eearly; 507 + CE = handles.Cearly; 508 + CD = handles.Cdirect; 509 + 510 + % Parametros 511 + SPL = handles.SPL; % Nivel de presion a 1 metro 512 + W = handles.W; % Potencia 513 + Q = handles.Q; % Directividad 514 + t = handles.t; % Rango temporal en segundos 515 + T = handles.T; % Tiempo de reverberaci�n de Eyring 516 + c = handles.c; % Velocidad de sonido 517 + S = handles.S; % Superficie 518 + V = handles.V; % Volumen 519 + alpha = handles.alpha; % Coeficiente de absorcion medio 520 + Z = handles.Z; % Impedancia del aire 521 + rho = handles.rho; % Densidad del aire 522 + A = handles.A; % Absorcion equivalente de Eyring 523 + RTmid = mean([handles.SPLm{1,10}(8),... 524 + handles.SPLm{1,10}(11),... 525 + handles.SPLm{1,10}(14)]); 526 + 527 + % Curvas 528 + Dist = handles.Distancia; % Vector de distancia 529 + EaseU = handles.EaseU; % Curva del campo util (EASE) 530 + EaseP = handles.EaseP; % Curva del campo perjudicial (EASE) 531 + TeoU = handles.TeoU; % Curva del campo util (Teorico) 532 + TeoP = handles.TeoP; % Curva del campo perjudicial (Teorico) 533 + EaseD = handles.EaseD; % Curva del campo directo (EASE) 534 + EaseE = handles.EaseE; % Curva del campo early (EASE) 535 + EaseL = handles.EaseL; % Curva del campo late (EASE) 536 + TeoD = handles.TeoD; % Curva del campo directo (Teorico) 537 + TeoE = handles.TeoE; % Curva del campo early (Teorico) 538 + TeoL = handles.TeoL; % Curva del campo late (Teorico) 539 + 540 + if isfield(handles,'DistCorte') 541 + DistCorte = handles.DistCorte; 542 + else 543 + DistCorte = NaN; 544 + end 545 + if isfield(handles,'DistCorteTeo') 546 + DistCorteTeo = handles.DistCorteTeo; 547 + else 548 + DistCorteTeo = NaN; 549 + end 550 + 551 + save([path,file],... 552 + 'eL','CL','eE','CE','CD',... % Coeficientes 553 + 'SPL','W','Q','t','T','c','S','V','alpha','Z','rho','A','RTmid',... % Parametros 554 + 'Dist','EaseU','EaseP','TeoU','TeoP',... % Curvas 555 + 'EaseD','EaseE','EaseL','TeoD','TeoE','TeoL',... % Curvas 2 556 + 'DistCorte','DistCorteTeo',... % Puntos de corte 557 + '-append') 558 + end 559 + msgbox('Los datos se han exportado correctamente','Datos guardados','help','modal') 560 + 561 + 562 + % --- Executes on button press in frec125. 563 + function frec125_Callback(hObject, eventdata, handles) 564 + % hObject handle to frec125 (see GCBO) 565 + % eventdata reserved - to be defined in a future version of MATLAB 566 + % handles structure with handles and user data (see GUIDATA) 567 + 568 + % Hint: get(hObject,'Value') returns toggle state of frec125 569 + 570 + 571 + % --- Executes on button press in frec250. 572 + function frec250_Callback(hObject, eventdata, handles) 573 + % hObject handle to frec250 (see GCBO) 574 + % eventdata reserved - to be defined in a future version of MATLAB 575 + % handles structure with handles and user data (see GUIDATA) 576 + 577 + % Hint: get(hObject,'Value') returns toggle state of frec250 578 + 579 + 580 + % --- Executes on button press in frec500. 581 + function frec500_Callback(hObject, eventdata, handles) 582 + % hObject handle to frec500 (see GCBO) 583 + % eventdata reserved - to be defined in a future version of MATLAB 584 + % handles structure with handles and user data (see GUIDATA) 585 + 586 + % Hint: get(hObject,'Value') returns toggle state of frec500 587 + 588 + 589 + % --- Executes on button press in frec1000. 590 + function frec1000_Callback(hObject, eventdata, handles) 591 + % hObject handle to frec1000 (see GCBO) 592 + % eventdata reserved - to be defined in a future version of MATLAB 593 + % handles structure with handles and user data (see GUIDATA) 594 + 595 + % Hint: get(hObject,'Value') returns toggle state of frec1000 596 + 597 + 598 + % --- Executes on button press in frec2000. 599 + function frec2000_Callback(hObject, eventdata, handles) 600 + % hObject handle to frec2000 (see GCBO) 601 + % eventdata reserved - to be defined in a future version of MATLAB 602 + % handles structure with handles and user data (see GUIDATA) 603 + 604 + % Hint: get(hObject,'Value') returns toggle state of frec2000 605 + 606 + 607 + % --- Executes on button press in frec4000. 608 + function frec4000_Callback(hObject, eventdata, handles) 609 + % hObject handle to frec4000 (see GCBO) 610 + % eventdata reserved - to be defined in a future version of MATLAB 611 + % handles structure with handles and user data (see GUIDATA) 612 + 613 + % Hint: get(hObject,'Value') returns toggle state of frec4000 614 + 615 + 616 + % --- Executes on button press in frec8000. 617 + function frec8000_Callback(hObject, eventdata, handles) 618 + % hObject handle to frec8000 (see GCBO) 619 + % eventdata reserved - to be defined in a future version of MATLAB 620 + % handles structure with handles and user data (see GUIDATA) 621 + 622 + % Hint: get(hObject,'Value') returns toggle state of frec8000 623 + 624 + 625 + % --- Executes on button press in frecFull. 626 + function frecFull_Callback(hObject, eventdata, handles) 627 + % hObject handle to frecFull (see GCBO) 628 + % eventdata reserved - to be defined in a future version of MATLAB 629 + % handles structure with handles and user data (see GUIDATA) 630 + 631 + % Hint: get(hObject,'Value') returns toggle state of frecFull 632 + 633 + 634 + % --- Executes on button press in botonPerjudicial. 635 + function botonPerjudicial_Callback(hObject, eventdata, handles) 636 + % hObject handle to botonPerjudicial (see GCBO) 637 + % eventdata reserved - to be defined in a future version of MATLAB 638 + % handles structure with handles and user data (see GUIDATA) 639 + 640 + % Hint: get(hObject,'Value') returns toggle state of botonPerjudicial 641 + 642 + 643 + % --- Executes on button press in botonEarly. 644 + function botonEarly_Callback(hObject, eventdata, handles) 645 + % hObject handle to botonEarly (see GCBO) 646 + % eventdata reserved - to be defined in a future version of MATLAB 647 + % handles structure with handles and user data (see GUIDATA) 648 + 649 + % Hint: get(hObject,'Value') returns toggle state of botonEarly 650 + 651 + 652 + % --- Executes on button press in botonDirecto. 653 + function botonDirecto_Callback(hObject, eventdata, handles) 654 + % hObject handle to botonDirecto (see GCBO) 655 + % eventdata reserved - to be defined in a future version of MATLAB 656 + % handles structure with handles and user data (see GUIDATA) 657 + 658 + % Hint: get(hObject,'Value') returns toggle state of botonDirecto 659 + 660 + 661 + % --- Executes on button press in trescampos. 662 + function trescampos_Callback(hObject, eventdata, handles) 663 + % Inhabilita botones que no tienen calculo con los tres campos separados 664 + set(handles.claridadboton,'enable','off') 665 + set(handles.definicionboton,'enable','off') 666 + set(handles.sonoridadboton,'enable','off') 667 + set(handles.ecogramaBoton,'enable','off') 668 + 669 + 670 + % --- Executes on button press in doscampos. 671 + function doscampos_Callback(hObject, eventdata, handles) 672 + % Habilita los botones 673 + set(handles.claridadboton,'enable','on') 674 + set(handles.definicionboton,'enable','on') 675 + set(handles.sonoridadboton,'enable','on') 676 + set(handles.ecogramaBoton,'enable','on')