GUI
Contents
Catenaria (no funciona)
function varargout = caten(varargin) % CAT MATLAB code for cat.fig % CAT, by itself, creates a new CAT or raises the existing % singleton*. % % H = CAT returns the handle to a new CAT or the handle to % the existing singleton*. % % CAT('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in CAT.M with the given input arguments. % % CAT('Property','Value',...) creates a new CAT or raises the % existing singleton*. Starting from the left, property value pairs are % applied to the GUI before cat_OpeningFcn gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to cat_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 cat % Last Modified by GUIDE v2.5 14-Jan-2019 13:12:16 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @cat_OpeningFcn, ... 'gui_OutputFcn', @cat_OutputFcn, ... 'gui_LayoutFcn', [] , ... 'gui_Callback', []); if nargin && ischar(varargin{1}) gui_State.gui_Callback = str2func(varargin{1}); end if nargout [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); else gui_mainfcn(gui_State, varargin{:}); end % End initialization code - DO NOT EDIT % --- Executes just before cat is made visible. function cat_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 cat (see VARARGIN) % Choose default command line output for cat handles.output = hObject; % Update handles structure guidata(hObject, handles); % UIWAIT makes cat wait for user response (see UIRESUME) % uiwait(handles.figure1); % --- Outputs from this function are returned to the command line. function varargout = cat_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; % --- Executes on slider movement. function a_Callback(hObject, eventdata, handles) % hObject handle to a (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'Value') returns position of slider % get(hObject,'Min') and get(hObject,'Max') to determine range of slider % --- Executes during object creation, after setting all properties. function a_CreateFcn(hObject, eventdata, handles) % hObject handle to a (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: slider controls usually have a light gray background. if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor',[.9 .9 .9]); end function T0_Callback(hObject, eventdata, handles) % hObject handle to T0 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of T0 as text % str2double(get(hObject,'String')) returns contents of T0 as a double % --- Executes during object creation, after setting all properties. function T0_CreateFcn(hObject, eventdata, handles) % hObject handle to T0 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function P_Callback(hObject, eventdata, handles) % hObject handle to P (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of P as text % str2double(get(hObject,'String')) returns contents of P as a double % --- Executes during object creation, after setting all properties. function P_CreateFcn(hObject, eventdata, handles) % hObject handle to P (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function hmin_Callback(hObject, eventdata, handles) % hObject handle to hmin (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of hmin as text % str2double(get(hObject,'String')) returns contents of hmin as a double % --- Executes during object creation, after setting all properties. function hmin_CreateFcn(hObject, eventdata, handles) % hObject handle to hmin (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % --- Executes on button press in pushbutton3. function pushbutton3_Callback(hObject, eventdata, handles) % hObject handle to pushbutton3 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) a=get(handles.a,'Value'); a=a*1000+50; T0=get(handles.T0,'String'); T0=str2num(T0); P=get(handles.P,'String'); P=str2num(P); hmin=get(handles.hmin, 'String'); hmin=str2num(hmin); [h L]=catenaria(a,T0,P,hmin) % --- Executes during object creation, after setting all properties. function text5_CreateFcn(hObject, eventdata, handles) % hObject handle to text5 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called
Error using load Unable to read file 'caten.fig'. No such file or directory. Error in matlab.graphics.internal.figfile.FigFile/read (line 31) hgDataVars = load(filename, '-mat', '-regexp', '^hg[M]'); Error in matlab.graphics.internal.figfile.FigFile Error in hgload (line 50) FF = matlab.graphics.internal.figfile.FigFile(filename); Error in matlab.hg.internal.openfigLegacy (line 57) [fig, savedvisible] = hgload(filename, struct('Visible','off')); Error in gui_mainfcn>local_openfig (line 286) gui_hFigure = matlab.hg.internal.openfigLegacy(name, singleton, visible); Error in gui_mainfcn (line 158) gui_hFigure = local_openfig(gui_State.gui_Name, gui_SingletonOpt, gui_Visible); Error in caten (line 45) gui_mainfcn(gui_State, varargin{:});