|
| 1 | +function varargout = jumma(varargin) |
| 2 | +% JUMMA MATLAB code for jumma.fig |
| 3 | +% JUMMA, by itself, creates a new JUMMA or raises the existing |
| 4 | +% singleton*. |
| 5 | +% |
| 6 | +% H = JUMMA returns the handle to a new JUMMA or the handle to |
| 7 | +% the existing singleton*. |
| 8 | +% |
| 9 | +% JUMMA('CALLBACK',hObject,eventData,handles,...) calls the local |
| 10 | +% function named CALLBACK in JUMMA.M with the given input arguments. |
| 11 | +% |
| 12 | +% JUMMA('Property' ,'Value',...) creates a new JUMMA or raises the |
| 13 | +% existing singleton*. Starting from the left, property value pairs are |
| 14 | +% applied to the GUI before jumma_OpeningFcn gets called. An |
| 15 | +% unrecognized property name or invalid value makes property application |
| 16 | +% stop. All inputs are passed to jumma_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 jumma |
| 24 | + |
| 25 | +% Last Modified by GUIDE v2.5 02-Feb-2018 16:27:28 |
| 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', @jumma_OpeningFcn, ... |
| 32 | + 'gui_OutputFcn', @jumma_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 jumma is made visible. |
| 48 | +function jumma_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 jumma (see VARARGIN) |
| 54 | + |
| 55 | +% Choose default command line output for jumma |
| 56 | +handles.output = hObject; |
| 57 | + |
| 58 | +% Update handles structure |
| 59 | +guidata(hObject, handles); |
| 60 | + |
| 61 | +% UIWAIT makes jumma wait for user response (see UIRESUME) |
| 62 | +% uiwait(handles.figure1); |
| 63 | + |
| 64 | + |
| 65 | +% --- Outputs from this function are returned to the command line. |
| 66 | +function varargout = jumma_OutputFcn(hObject, eventdata, handles) |
| 67 | +% varargout cell array for returning output args (see VARARGOUT); |
| 68 | +% hObject handle to figure |
| 69 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 70 | +% handles structure with handles and user data (see GUIDATA) |
| 71 | + |
| 72 | +% Get default command line output from handles structure |
| 73 | +varargout{1} = handles.output; |
| 74 | + |
| 75 | + |
| 76 | +% --- Executes on slider movement. |
| 77 | +function slider1_Callback(hObject, eventdata, handles) |
| 78 | +% hObject handle to slider1 (see GCBO) |
| 79 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 80 | +% handles structure with handles and user data (see GUIDATA) |
| 81 | + |
| 82 | +% Hints: get(hObject,'Value') returns position of slider |
| 83 | +% get(hObject,'Min') and get(hObject,'Max') to determine range of slider |
| 84 | +h1=get(handles.slider1,'value'); |
| 85 | +set(handles.edit1,'string',h1); |
| 86 | +%h1 = get(hObject,'Value') |
| 87 | +% print h1 |
| 88 | +save ('h1.txt','h1','-ascii') |
| 89 | + |
| 90 | + |
| 91 | +% --- Executes during object creation, after setting all properties. |
| 92 | +function slider1_CreateFcn(hObject, eventdata, handles) |
| 93 | +% hObject handle to slider1 (see GCBO) |
| 94 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 95 | +% handles empty - handles not created until after all CreateFcns called |
| 96 | + |
| 97 | +% Hint: slider controls usually have a light gray background. |
| 98 | +if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
| 99 | + set(hObject,'BackgroundColor',[.9 .9 .9]); |
| 100 | +end |
| 101 | + |
| 102 | + |
| 103 | +% --- Executes on slider movement. |
| 104 | +function slider2_Callback(hObject, eventdata, handles) |
| 105 | +% hObject handle to slider2 (see GCBO) |
| 106 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 107 | +% handles structure with handles and user data (see GUIDATA) |
| 108 | + |
| 109 | +% Hints: get(hObject,'Value') returns position of slider |
| 110 | +% get(hObject,'Min') and get(hObject,'Max') to determine range of slider |
| 111 | +global h2; |
| 112 | +h2=get(handles.slider2,'value'); |
| 113 | +set(handles.edit2,'string',h2); |
| 114 | +%h2 = get(hObject,'Value') |
| 115 | +% print h2 |
| 116 | +save ('h2.txt','h2','-ascii') |
| 117 | + |
| 118 | + |
| 119 | +% --- Executes during object creation, after setting all properties. |
| 120 | +function slider2_CreateFcn(hObject, eventdata, handles) |
| 121 | +% hObject handle to slider2 (see GCBO) |
| 122 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 123 | +% handles empty - handles not created until after all CreateFcns called |
| 124 | + |
| 125 | +% Hint: slider controls usually have a light gray background. |
| 126 | +if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
| 127 | + set(hObject,'BackgroundColor',[.9 .9 .9]); |
| 128 | +end |
| 129 | + |
| 130 | + |
| 131 | +% --- Executes on slider movement. |
| 132 | +function slider3_Callback(hObject, eventdata, handles) |
| 133 | +% hObject handle to slider3 (see GCBO) |
| 134 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 135 | +% handles structure with handles and user data (see GUIDATA) |
| 136 | + |
| 137 | +% Hints: get(hObject,'Value') returns position of slider |
| 138 | +% get(hObject,'Min') and get(hObject,'Max') to determine range of slider |
| 139 | +global s1; |
| 140 | +s1=get(handles.slider3,'value'); |
| 141 | +set(handles.edit3,'string',s1); |
| 142 | +%s1 = get(hObject,'Value') |
| 143 | +% print s1 |
| 144 | +save ('s1.txt','s1','-ascii') |
| 145 | + |
| 146 | +% --- Executes during object creation, after setting all properties. |
| 147 | +function slider3_CreateFcn(hObject, eventdata, handles) |
| 148 | +% hObject handle to slider3 (see GCBO) |
| 149 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 150 | +% handles empty - handles not created until after all CreateFcns called |
| 151 | + |
| 152 | +% Hint: slider controls usually have a light gray background. |
| 153 | +if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
| 154 | + set(hObject,'BackgroundColor',[.9 .9 .9]); |
| 155 | +end |
| 156 | + |
| 157 | + |
| 158 | +% --- Executes on slider movement. |
| 159 | +function slider4_Callback(hObject, eventdata, handles) |
| 160 | +% hObject handle to slider4 (see GCBO) |
| 161 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 162 | +% handles structure with handles and user data (see GUIDATA) |
| 163 | + |
| 164 | +% Hints: get(hObject,'Value') returns position of slider |
| 165 | +% get(hObject,'Min') and get(hObject,'Max') to determine range of slider |
| 166 | +global s2; |
| 167 | +s2=get(handles.slider4,'value'); |
| 168 | +set(handles.edit4,'string',s2); |
| 169 | +%s2 = get(hObject,'Value') |
| 170 | +% print s2 |
| 171 | +save ('s2.txt','s2','-ascii') |
| 172 | + |
| 173 | +% --- Executes during object creation, after setting all properties. |
| 174 | +function slider4_CreateFcn(hObject, eventdata, handles) |
| 175 | +% hObject handle to slider4 (see GCBO) |
| 176 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 177 | +% handles empty - handles not created until after all CreateFcns called |
| 178 | + |
| 179 | +% Hint: slider controls usually have a light gray background. |
| 180 | +if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
| 181 | + set(hObject,'BackgroundColor',[.9 .9 .9]); |
| 182 | +end |
| 183 | + |
| 184 | + |
| 185 | +% --- Executes on slider movement. |
| 186 | +function slider5_Callback(hObject, eventdata, handles) |
| 187 | +% hObject handle to slider5 (see GCBO) |
| 188 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 189 | +% handles structure with handles and user data (see GUIDATA) |
| 190 | + |
| 191 | +% Hints: get(hObject,'Value') returns position of slider |
| 192 | +% get(hObject,'Min') and get(hObject,'Max') to determine range of slider |
| 193 | +global v1; |
| 194 | +v1=get(handles.slider5,'value'); |
| 195 | +set(handles.edit5,'string',v1); |
| 196 | +%v1 = get(hObject,'Value') |
| 197 | +% print v1 |
| 198 | +save ('v1.txt','v1','-ascii') |
| 199 | + |
| 200 | + |
| 201 | +% --- Executes during object creation, after setting all properties. |
| 202 | +function slider5_CreateFcn(hObject, eventdata, handles) |
| 203 | +% hObject handle to slider5 (see GCBO) |
| 204 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 205 | +% handles empty - handles not created until after all CreateFcns called |
| 206 | + |
| 207 | +% Hint: slider controls usually have a light gray background. |
| 208 | +if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
| 209 | + set(hObject,'BackgroundColor',[.9 .9 .9]); |
| 210 | +end |
| 211 | + |
| 212 | + |
| 213 | +% --- Executes on slider movement. |
| 214 | +function slider6_Callback(hObject, eventdata, handles) |
| 215 | +% hObject handle to slider6 (see GCBO) |
| 216 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 217 | +% handles structure with handles and user data (see GUIDATA) |
| 218 | + |
| 219 | +% Hints: get(hObject,'Value') returns position of slider |
| 220 | +% get(hObject,'Min') and get(hObject,'Max') to determine range of slider |
| 221 | +global v2; |
| 222 | +v2=get(handles.slider6,'value'); |
| 223 | +set(handles.edit6,'string',v2); |
| 224 | +%v2 = get(hObject,'Value') |
| 225 | +% print v2 |
| 226 | +save ('v2.txt','v2','-ascii') |
| 227 | + |
| 228 | +% --- Executes during object creation, after setting all properties. |
| 229 | +function slider6_CreateFcn(hObject, eventdata, handles) |
| 230 | +% hObject handle to slider6 (see GCBO) |
| 231 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 232 | +% handles empty - handles not created until after all CreateFcns called |
| 233 | + |
| 234 | +% Hint: slider controls usually have a light gray background. |
| 235 | +if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
| 236 | + set(hObject,'BackgroundColor',[.9 .9 .9]); |
| 237 | +end |
| 238 | + |
| 239 | + |
| 240 | + |
| 241 | +function edit1_Callback(hObject, eventdata, handles) |
| 242 | +% hObject handle to edit1 (see GCBO) |
| 243 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 244 | +% handles structure with handles and user data (see GUIDATA) |
| 245 | + |
| 246 | +% Hints: get(hObject,'String') returns contents of edit1 as text |
| 247 | +% str2double(get(hObject,'String')) returns contents of edit1 as a double |
| 248 | + |
| 249 | + |
| 250 | +% --- Executes during object creation, after setting all properties. |
| 251 | +function edit1_CreateFcn(hObject, eventdata, handles) |
| 252 | +% hObject handle to edit1 (see GCBO) |
| 253 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 254 | +% handles empty - handles not created until after all CreateFcns called |
| 255 | + |
| 256 | +% Hint: edit controls usually have a white background on Windows. |
| 257 | +% See ISPC and COMPUTER. |
| 258 | +if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
| 259 | + set(hObject,'BackgroundColor','white'); |
| 260 | +end |
| 261 | + |
| 262 | + |
| 263 | + |
| 264 | +function edit2_Callback(hObject, eventdata, handles) |
| 265 | +% hObject handle to edit2 (see GCBO) |
| 266 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 267 | +% handles structure with handles and user data (see GUIDATA) |
| 268 | + |
| 269 | +% Hints: get(hObject,'String') returns contents of edit2 as text |
| 270 | +% str2double(get(hObject,'String')) returns contents of edit2 as a double |
| 271 | + |
| 272 | + |
| 273 | +% --- Executes during object creation, after setting all properties. |
| 274 | +function edit2_CreateFcn(hObject, eventdata, handles) |
| 275 | +% hObject handle to edit2 (see GCBO) |
| 276 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 277 | +% handles empty - handles not created until after all CreateFcns called |
| 278 | + |
| 279 | +% Hint: edit controls usually have a white background on Windows. |
| 280 | +% See ISPC and COMPUTER. |
| 281 | +if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
| 282 | + set(hObject,'BackgroundColor','white'); |
| 283 | +end |
| 284 | + |
| 285 | + |
| 286 | + |
| 287 | +function edit3_Callback(hObject, eventdata, handles) |
| 288 | +% hObject handle to edit3 (see GCBO) |
| 289 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 290 | +% handles structure with handles and user data (see GUIDATA) |
| 291 | + |
| 292 | +% Hints: get(hObject,'String') returns contents of edit3 as text |
| 293 | +% str2double(get(hObject,'String')) returns contents of edit3 as a double |
| 294 | + |
| 295 | + |
| 296 | +% --- Executes during object creation, after setting all properties. |
| 297 | +function edit3_CreateFcn(hObject, eventdata, handles) |
| 298 | +% hObject handle to edit3 (see GCBO) |
| 299 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 300 | +% handles empty - handles not created until after all CreateFcns called |
| 301 | + |
| 302 | +% Hint: edit controls usually have a white background on Windows. |
| 303 | +% See ISPC and COMPUTER. |
| 304 | +if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
| 305 | + set(hObject,'BackgroundColor','white'); |
| 306 | +end |
| 307 | + |
| 308 | + |
| 309 | + |
| 310 | +function edit4_Callback(hObject, eventdata, handles) |
| 311 | +% hObject handle to edit4 (see GCBO) |
| 312 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 313 | +% handles structure with handles and user data (see GUIDATA) |
| 314 | + |
| 315 | +% Hints: get(hObject,'String') returns contents of edit4 as text |
| 316 | +% str2double(get(hObject,'String')) returns contents of edit4 as a double |
| 317 | + |
| 318 | + |
| 319 | +% --- Executes during object creation, after setting all properties. |
| 320 | +function edit4_CreateFcn(hObject, eventdata, handles) |
| 321 | +% hObject handle to edit4 (see GCBO) |
| 322 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 323 | +% handles empty - handles not created until after all CreateFcns called |
| 324 | + |
| 325 | +% Hint: edit controls usually have a white background on Windows. |
| 326 | +% See ISPC and COMPUTER. |
| 327 | +if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
| 328 | + set(hObject,'BackgroundColor','white'); |
| 329 | +end |
| 330 | + |
| 331 | + |
| 332 | + |
| 333 | +function edit5_Callback(hObject, eventdata, handles) |
| 334 | +% hObject handle to edit5 (see GCBO) |
| 335 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 336 | +% handles structure with handles and user data (see GUIDATA) |
| 337 | + |
| 338 | +% Hints: get(hObject,'String') returns contents of edit5 as text |
| 339 | +% str2double(get(hObject,'String')) returns contents of edit5 as a double |
| 340 | + |
| 341 | + |
| 342 | +% --- Executes during object creation, after setting all properties. |
| 343 | +function edit5_CreateFcn(hObject, eventdata, handles) |
| 344 | +% hObject handle to edit5 (see GCBO) |
| 345 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 346 | +% handles empty - handles not created until after all CreateFcns called |
| 347 | + |
| 348 | +% Hint: edit controls usually have a white background on Windows. |
| 349 | +% See ISPC and COMPUTER. |
| 350 | +if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
| 351 | + set(hObject,'BackgroundColor','white'); |
| 352 | +end |
| 353 | + |
| 354 | + |
| 355 | + |
| 356 | +function edit6_Callback(hObject, eventdata, handles) |
| 357 | +% hObject handle to edit6 (see GCBO) |
| 358 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 359 | +% handles structure with handles and user data (see GUIDATA) |
| 360 | + |
| 361 | +% Hints: get(hObject,'String') returns contents of edit6 as text |
| 362 | +% str2double(get(hObject,'String')) returns contents of edit6 as a double |
| 363 | + |
| 364 | + |
| 365 | +% --- Executes during object creation, after setting all properties. |
| 366 | +function edit6_CreateFcn(hObject, eventdata, handles) |
| 367 | +% hObject handle to edit6 (see GCBO) |
| 368 | +% eventdata reserved - to be defined in a future version of MATLAB |
| 369 | +% handles empty - handles not created until after all CreateFcns called |
| 370 | + |
| 371 | +% Hint: edit controls usually have a white background on Windows. |
| 372 | +% See ISPC and COMPUTER. |
| 373 | +if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
| 374 | + set(hObject,'BackgroundColor','white'); |
| 375 | +end |
0 commit comments