Hi I am developing A Gui which should calculate the values of an input given by the user, i am not able to add up the functionality to the gui and plotting the graph this is what i have done till now, can u add the functionality and linking the graph

조회 수: 2 (최근 30일)
function plot_button_Callback(hObject, eventdata, handles, varargin) % hObject handle to plot_button (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
% Get user input from GUI f1 = str2double(get(handles.f1_input,'String')); f2 = str2double(get(handles.f2_input,'String'));
f3 = str2double(get(handles.f3_input,'String')); f4 = str2double(get(handles.f4_input,'String')); f5 = str2double(get(handles.f5_input,'String')); f6 = str2double(get(handles.f6_input,'String'));
f7 = str2double(get(handles.f7_input,'String')); f8 = str2double(get(handles.f8_input,'String')); t = eval(get(handles.t_input,'String'));
% Calculate data FR1=f5-f1; FR2=f6-f2; FR4=f8-f4; FR3=f7-f3; x = (FR1+0.707*(FR2-FR4))/4; y = (FR3+0.707*(FR2+FR4))/4; m = y.*conj(y)/512; f = 1000*(0:256)/512;
% Create frequency plot in proper axes plot(handles.frequency_axes,x,y) set(handles.frequency_axes,'XMinorTick','on') grid on
% Create time plot in proper axes plot(handles.time_axes,t,x) set(handles.time_axes,'XMinorTick','on') grid on

답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by