Advertisement
F22

Untitled

F22
Jan 19th, 2018
492
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. P = str2num(char(get(handles.edit4,'String')));
  2. minC = str2num(char(get(handles.edit5,'String')));
  3. maxC = str2num(char(get(handles.edit6,'String')));
  4. v0 = str2num(char(get(handles.edit1,'String')));
  5. f = str2num(char(get(handles.edit7,'String')));
  6. ta = str2num(char(get(handles.edit8,'String')));
  7. td = str2num(char(get(handles.edit9,'String')));
  8. dt = str2num(char(get(handles.edit13,'String')));
  9.  
  10. [C, ktet, Usr, Ut, kt, ir, vr, ti, tc] = doborC_2(P, minC, maxC, v0, f, ta, td, dt);
  11.  
  12. t=ta:dt:td;
  13.  
  14. textLabel = sprintf('%f', Usr);
  15. set(handles.text14, 'String', textLabel);
  16.  
  17. textLabel = sprintf('%f', Ut);
  18. set(handles.text15, 'String', textLabel);
  19.  
  20. textLabel = sprintf('%f', kt);
  21. set(handles.text16, 'String', textLabel);
  22.  
  23. textLabel = sprintf('%f', C);
  24. set(handles.text19, 'String', textLabel);
  25.  
  26. textLabel = sprintf('%f', ktet);
  27. set(handles.text20, 'String', textLabel);
  28.  
  29. for i=1:length(ir)
  30. X=vr.*ir;
  31. end
  32. Y=X*5,1;
  33.  
  34. axes(handles.axes2);
  35. plot(t, X);
  36.  
  37. axes(handles.axes1);
  38. plot(t, Y);
  39.  
  40. function edit1_Callback(hObject, eventdata, handles)
  41. % hObject handle to edit1 (see GCBO)
  42. % eventdata reserved - to be defined in a future version of MATLAB
  43. % handles structure with handles and user data (see GUIDATA)
  44.  
  45. % Hints: get(hObject,'String') returns contents of edit1 as text
  46. % str2double(get(hObject,'String')) returns contents of edit1 as a double
  47.  
  48.  
  49.  
  50. % --- Executes during object creation, after setting all properties.
  51. function edit1_CreateFcn(hObject, eventdata, handles)
  52. % hObject handle to edit1 (see GCBO)
  53. % eventdata reserved - to be defined in a future version of MATLAB
  54. % handles empty - handles not created until after all CreateFcns called
  55.  
  56. % Hint: edit controls usually have a white background on Windows.
  57. % See ISPC and COMPUTER.
  58. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  59. set(hObject,'BackgroundColor','white');
  60. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement