Professional Documents
Culture Documents
% hObject
handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% varargin
command line arguments to basharat (see VARARGIN)
set(handles.freq,'string','freq');
set(handles.amp,'string','amp');
set(handles.phase,'string','phase');
set(handles.run,'string','run');
% Choose default command line output for basharat
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes basharat wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = basharat_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject
handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
freq=get(handles.freq,'string');
freq1=str2double(freq);
amp_Callback(hObject, eventdata, handles)
amp=get(handles.amp,'string');
amp1=str2double(amp);
phase_Callback(hObject, eventdata, handles)
phase=get(handles.phase,'string');
phase1=str2double(phase);
y=amp1*sin(2*pi*freq1*t-phase1);
plot(t,y);
% hObject
% eventdata
% handles