Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- P = str2num(char(get(handles.edit4,'String')));
- minC = str2num(char(get(handles.edit5,'String')));
- maxC = str2num(char(get(handles.edit6,'String')));
- v0 = str2num(char(get(handles.edit1,'String')));
- f = str2num(char(get(handles.edit7,'String')));
- ta = str2num(char(get(handles.edit8,'String')));
- td = str2num(char(get(handles.edit9,'String')));
- dt = str2num(char(get(handles.edit13,'String')));
- [C, ktet, Usr, Ut, kt, ir, vr, ti, tc] = doborC_2(P, minC, maxC, v0, f, ta, td, dt);
- t=ta:dt:td;
- textLabel = sprintf('%f', Usr);
- set(handles.text14, 'String', textLabel);
- textLabel = sprintf('%f', Ut);
- set(handles.text15, 'String', textLabel);
- textLabel = sprintf('%f', kt);
- set(handles.text16, 'String', textLabel);
- textLabel = sprintf('%f', C);
- set(handles.text19, 'String', textLabel);
- textLabel = sprintf('%f', ktet);
- set(handles.text20, 'String', textLabel);
- for i=1:length(ir)
- X=vr.*ir;
- end
- Y=X*5,1;
- axes(handles.axes2);
- plot(t, X);
- axes(handles.axes1);
- plot(t, Y);
- function edit1_Callback(hObject, eventdata, handles)
- % hObject handle to edit1 (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 edit1 as text
- % str2double(get(hObject,'String')) returns contents of edit1 as a double
- % --- Executes during object creation, after setting all properties.
- function edit1_CreateFcn(hObject, eventdata, handles)
- % hObject handle to edit1 (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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement