Разработка регулятора синхронного компенсатора

Дипломная работа - Физика

Другие дипломы по предмету Физика

lly have a white background on Windows.

% See ISPC and COMPUTER.ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))(hObject,'BackgroundColor','white');volume_Callback(hObject, eventdata, handles)

% hObject handle to volume (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 volume as text

% str2double(get(hObject,'String')) returns contents of volume as a double= str2double(get(hObject, 'String'));isnan(volume)(hObject, 'String', 0);('Input must be a number','Error');

% Save the new volume value.metricdata.volume = volume;(hObject,handles)

% --- Executes on button press in calculate.calculate_Callback(hObject, eventdata, handles)

% hObject handle to calculate (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)= handles.metricdata.density * handles.metricdata.volume;(handles.mass, 'String', mass);

% --- Executes on button press in reset.reset_Callback(hObject, eventdata, handles)

% hObject handle to reset (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)_gui(gcbf, handles, true);

% --- Executes when selected object changed in unitgroup.unitgroup_SelectionChangeFcn(hObject, eventdata, handles)

% hObject handle to the selected object in unitgroup

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)(hObject == handles.english)(handles.text4, 'String', 'lb/cu.in');(handles.text5, 'String', 'cu.in');(handles.text6, 'String', 'lb');(handles.text4, 'String', 'kg/cu.m');(handles.text5, 'String', 'cu.m');(handles.text6, 'String', 'kg');

% --------------------------------------------------------------------initialize_gui(fig_handle, handles, isreset)

% If the metricdata field is present and the reset flag is false, it means

% we are we are just re-initializing a GUI by calling it from the cmd line

% while it is up. So, bail out as we dont want to reset the data.isfield(handles, 'metricdata') && ~isreset;.metricdata.density = 0;.metricdata.volume = 0;(handles.density, 'String', handles.metricdata.density);(handles.volume, 'String', handles.metricdata.volume);(handles.mass, 'String', 0);(handles.unitgroup, 'SelectedObject', handles.english);(handles.text4, 'String', 'lb/cu.in');(handles.text5, 'String', 'cu.in');(handles.text6, 'String', 'lb');

% Update handles structure(handles.figure1, handles);

% --- Executes on button press in pushbutton9.pushbutton9_Callback(hObject, eventdata, handles)

% hObject handle to pushbutton9 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% --- Executes on button press in togglebutton1.togglebutton1_Callback(hObject, eventdata, handles)

% hObject handle to togglebutton1 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of togglebutton1

% --- Executes on button press in togglebutton2.togglebutton2_Callback(hObject, eventdata, handles)

% hObject handle to togglebutton2 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of togglebutton2

% --- Executes on button press in togglebutton3.togglebutton3_Callback(hObject, eventdata, handles)

% hObject handle to togglebutton3 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of togglebutton3

% --- Executes on button press in togglebutton4.togglebutton4_Callback(hObject, eventdata, handles)

% hObject handle to togglebutton4 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of togglebutton4

% --- Executes on button press in togglebutton5.togglebutton5_Callback(hObject, eventdata, handles)

% hObject handle to togglebutton5 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of togglebutton5

% --- Executes on slider movement.slider2_Callback(hObject, eventdata, handles)

% hObject handle to slider2 (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.slider2_CreateFcn(hObject, eventdata, handles)

% hObject handle to slider2 (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.isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))(hObject,'BackgroundColor',[.9 .9 .9]);

% --- Executes on button press in checkbox1.checkbox1_Callback(hObject, eventdata, handles)

% hObject handle to checkbox1 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox1

% --- Executes on button press in checkbox3.checkbox3_Callback(hObject, eventdata, handles)

% hObject handle to checkbox3 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of checkbox3

% --- Executes on button press in togglebutton15.togglebutton15_Callback(hObject, eventdata, handles)

% hObject handle to togglebutton15 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of togglebutton15

% --- Executes on button press in togglebutton16.togglebutton16_Callback(hObject, eventdata, handles)

% hObject handle to togglebutton16 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of togglebutton16

% --- Executes on button press in togglebutton10.togglebutton10_Callback(hObject, eventdata, handles)

% hObject handle to togglebutton10 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of togglebutton10

% --- Executes on button press in togglebutton11.togglebutton11_Callback(hObject, eventdata, handles)

% hObject handle to togglebutton11 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of togglebutton11

% --- Executes on button press in togglebutton12.togglebutton12_Callback(hObject, eventdata, handles)

% hObject handle to togglebutton12 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of togglebutton12

% --- Executes on button press in togglebutton13.togglebutton13_Callback(hObject, eventdata, handles)

% hObject handle to togglebutton13 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of togglebutton13

% --- Executes on selection change in listbox1.listbox1_Callback(hObject, eventdata, handles)

% hObject handle to listbox1 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns listbox1 contents as cell array

% contents{get(hObject,'Value')} returns selected item from listbox1

% --- Executes during object creation, after setting all properties.listbox1_CreateFcn(hObject, eventdata, handles)

% hObject handle to listbox1 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles empty - handles not created until after all CreateFcns called

% Hint: listbox controls usually have a white background on Windows.

% See ISPC and COMPUTER.ispc && isequal(get(hObject,'BackgroundColor'), get(0,'d