Signal and Systems. Matlab GUI based analysis. XpertSolver.com

Similar documents
LAMPIRAN 1. Percobaan

% Edit the above text to modify the response to help Video_Player. % Last Modified by GUIDE v May :38:12

LISTING PROGRAM. % Edit the above text to modify the response to help cover. % Last Modified by GUIDE v Jun :24:43

GUI code for different sections is in following sections

% Edit the above text to modify the response to help Principal

1. Peralatan LAMPIRAN

LISTING PROGRAM. % UIWAIT makes pertama wait for user response (see UIRESUME) % uiwait(handles.figure1);

We are IntechOpen, the world s leading publisher of Open Access books Built by scientists, for scientists. International authors and editors

Homeworks on FFT Instr. and Meas. for Communication Systems- Gianfranco Miele. Name Surname

LAMPIRAN A PROGRAM PELATIHAN DAN PENGUJIAN

Supplementary Information

Lithium-Ion Battery Data. Management

Lampiran 1. Script M-File Global Ridge

A NEW MACHINING COST CALCULATOR (MC 2 )

MV 1:00 1:05 1:00 1:05

Finding a Minimum Covering Circle Based on Infinity Norms

Akkad Bakad Bambai Bo

Ear Recognition. By: Zeyangyi Wang

ECE Fall 05. Undergraduate Research: Digital Signal Processing & Quantization Effects

OMR Sheet Recognition

PROGRAMMING IN MATLAB

1.Matlab Image Encryption Code

% --- Executes on button press in btn_gsn. function btn_gsn_callback(hobject, eventdata, handles) GaussianSpeckleNoise close AiSoftware;

Airfoil Boundary Layer Separation Prediction

LAMPIRAN LISTING PROGRAM

Contents INTERFACING MATLAB WITH EMBEDDED SYSTEMS

LAMPIRAN A LISTINGPROGRAM

.., 7. References. [ 1] 1 mage Analysis and Mathematical Morphology:J.Serra. [2] Erosion, dilation and related operators,by Mariusz Jankowski

Parallel-connected solar arrays

Solving Sudoku with MATLAB

LISTING PROGRAM. if nargout [varargout{1:nargout}] = gui_mainfcn(gui_state, varargin{:}); else gui_mainfcn(gui_state, varargin{:}); end

Real-Time IIR Digital Filters

Implementation of a Motion Detection System

GUI Signal Analysis and Filtering Design

Main Form visual Studio

ALGORITHMS AND INTERFACE FOR OCEAN ACOUSTIC RAY-TRACING (Developed in MATLAB)

COMPLETELY AUTOMATED PUBLIC TURING TEST TO TELL COMPUTERS AND HUMANS APART

Accepted by... John H. Lienhard V

TREBALL FINAL DE GRAU

MEASURING INTERFACIAL TENSION WITH THE PENDANT DROP METHOD

MATLAB. Creating Graphical User Interfaces Version 7. The Language of Technical Computing

IMAGE STEGANOGRAPHY USING DISCRETE COSINE TRNASFORM ALGORITHM

1 Lab 3, Simulation of crank-piston system

LOK-Viewer : Graphical Interface Application for Geomagnetic Data in Observatory Geomagnetic Lombok

Design of Automated Digital Eye Palpation Exam for Intraocular Pressure Measurement

Keywords: Learning automata, Vertex multicoloring.

Introduction To MATLAB Interactive Graphics

GENDER ESTIMATION BASED ON FACIAL IMAGE AZLIN BT YAJID UNIVERSITI TEKNOLOGI MALAYSIA

UNIVERSITÀ DEGLI STUDI DI PADOVA

Ultraplatjoslas radaru izmantošana automašīnu skaitīšanai

Sandia National Laboratories: Implementation of and Experimenting with a Clustering Tool

The Language of Technical Computing. Computation. Visualization. Programming. Creating Graphical User Interfaces Version 1

SBT 645 Introduction to Scientific Computing in Sports Science #5

Part #10. AE0B17MTB Matlab. Miloslav Čapek Viktor Adler, Pavel Valtr, Filip Kozák

Special Topics II: Graphical User Interfaces (GUIs)

Still More About Matlab GUI s (v. 1.3) Popup Menus. Popup Menu Exercise. Still More GUI Info - GE /29/2012. Copyright C. S. Tritt, Ph.D.

Blind to Change. More on Graphical User Interfaces. Exploring change blindness

BUILDING A MATLAB GUI. Education Transfer Plan Seyyed Khandani, Ph.D. IISME 2014

ANEXO G. % Se calcula el valor de la señal cuando a llegado % al 28.3% y 63.2% de su de su cambio total.

Chapter 6 User-Defined Functions. dr.dcd.h CS 101 /SJC 5th Edition 1

W1005 Intro to CS and Programming in MATLAB. Data Structures. Fall 2014 Instructor: Ilia Vovsha. hep://

Building a Graphical User Interface

Computational Methods of Scientific Programming

GUI Building for Test & Measurement Applications

Flow Control and Functions

INTRODUCTION TO MATLAB INTERACTIVE GRAPHICS EXERCISES

LAMPIRAN A: LISTING PROGRAM

Interactive Programs

Intel Quark microcontroller D2000 How to communicate with MATLAB over UART

Flow Control. Spring Flow Control Spring / 26

Matlab for Engineers

1 >> Lecture 3 2 >> 3 >> -- Functions 4 >> Zheng-Liang Lu 169 / 221

Introduction to. The Help System. Variable and Memory Management. Matrices Generation. Interactive Calculations. Vectors and Matrices

1 >> Lecture 3 2 >> 3 >> -- Functions 4 >> Zheng-Liang Lu 172 / 225

SECTION 2: PROGRAMMING WITH MATLAB. MAE 4020/5020 Numerical Methods with MATLAB

Additions to the CREWES Matlab Library

Interfacing to MATLAB. You can download the interface developed in this tutorial. It exists as a collection of 3 MATLAB files.

MATLAB for the Sciences

Computational Methods of Scientific Programming Fall 2008

There are two ways to launch Graphical User Interface (GUI). You can either

Review: Event Driven Programming & GUI. CSCE155N Matlab Fall 2016

Digital Image Processing. Today Outline. Matlab Desktop. Matlab Basics

Computational Methods of Scientific Programming. Matlab Lecture 3 Lecturers Thomas A Herring Chris Hill

Computational Methods of Scientific Programming. Matlab Lecture 4 Lecturers Thomas A Herring Chris Hill

User Defined Functions

Spring 2010 Instructor: Michele Merler.

Lab 8: Conditional Statements with Multiple Branches (please develop programs individually)

10 M-File Programming

Purpose: How to train an MLP neural network in MATLAB environment!

Chemical Engineering 541

Lecture 6 MATLAB programming (4) Dr.Qi Ying

Introduction. Like other programming languages, MATLAB has means for modifying the flow of a program

Anisotropy analysis: the MATLAB code

COMS 3101 Programming Languages: MATLAB. Lecture 2

User Guide V0.1. Overview 2. Creating a project 2

Premium Auto Attendant USER GUIDE

Premium Auto Attendant User Guide

Example: A Four-Node Network

Performance Analysis for Algorithms of Recognition of Geometric Patterns in Mechanical Pieces

Graphical User Interface. GUI in MATLAB. Eng. Banan Ahmad Allaqta

Transcription:

Signal and Systems Matlab GUI based analysis

Description: This Signal and Systems based Project takes a sound file in.wav format and performed a detailed analysis, as well as filtering of the signal. The project is programmed in matlab and provides and easy to use GUI interface and provides user to perform various functionalities. Programming: function varargout = pro_sns_p2(varargin) % PRO_SNS_P2 M-file for pro_sns_p2.fig % PRO_SNS_P2, by itself, creates a new PRO_SNS_P2 or raises the existing % singleton*. % % H = PRO_SNS_P2 returns the handle to a new PRO_SNS_P2 or the handle to % the existing singleton*. % % PRO_SNS_P2('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in PRO_SNS_P2.M with the given input arguments. % % PRO_SNS_P2('Property','Value',...) creates a new PRO_SNS_P2 or raises the % existing singleton*. Starting from the left, property value pairs are % applied to the GUI before pro_sns_p2_openingfcn gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to pro_sns_p2_openingfcn via varargin. % % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one % instance to run (singleton)". % % See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to help pro_sns_p2 % Last Modified by GUIDE v2.5 04-May-2011 01:44:27 % Begin initialization code - DO NOT EDIT gui_singleton = 1; gui_state = struct('gui_name', mfilename,... 'gui_singleton', gui_singleton,... 'gui_openingfcn', @pro_sns_p2_openingfcn,... 'gui_outputfcn', @pro_sns_p2_outputfcn,... 'gui_layoutfcn', [],... 'gui_callback', []); if nargin && ischar(varargin{1}) gui_state.gui_callback = str2func(varargin{1}); if nargout [varargout{1:nargout}] = gui_mainfcn(gui_state, varargin{:}); gui_mainfcn(gui_state, varargin{:}); % End initialization code - DO NOT EDIT

% --- Executes just before pro_sns_p2 is made visible. function pro_sns_p2_openingfcn(hobject, eventdata, handles, varargin) % This function has no output args, see OutputFcn. % hobject handle to figure % varargin command line arguments to pro_sns_p2 (see VARARGIN) % Choose default command line output for pro_sns_p2 clc; handles.output = hobject; [handles.osig,handles.fs]=wavread('sampledata.wav'); handles.noofbits=5; handles.td1=1; handles.fd1=0; handles.td2=0; handles.fd2=1; handles.controlvol=.5; handles.maximumosig=max(abs(handles.osig)); handles.selectsig1=1; handles.selectsig2=1; handles.soundplay=1; set(handles.radiotime1,'value',handles.td1); set(handles.radiofrequency1,'value',handles.fd1); set(handles.radiotime2,'value',handles.td2); set(handles.radiofrequency2,'value',handles.fd2); set(handles.slidercvolume,'value',handles.controlvol); handles.t=0:1/handles.fs:(length(handles.osig)/handles.fs)-1/handles.fs; ; plot(handles.t,handles.osig) handles.osig=fftshift(fft(handles.osig)/length(handles.osig)); handles.x_axis=-length(handles.osig)/2:1:length(handles.osig)/2-1; ; plot(handles.x_axis,abs(handles.osig)); % Update handles structure % UIWAIT makes pro_sns_p2 wait for user response (see UIRESUME) % uiwait(handles.figure1); % --- Outputs from this function are returned to the command line. function varargout = pro_sns_p2_outputfcn(hobject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT); % hobject handle to figure % Get default command line output from handles structure varargout{1} = handles.output;

% --- Executes on button press in radiotime1. function radiotime1_callback(hobject, eventdata, handles) % hobject handle to radiotime1 (see GCBO) % Hint: get(hobject,'value') returns toggle state of radiotime1 handles.td1=1; handles.fd1=0; if handles.selectsig1==1 plot(handles.t,handles.osig) if handles.selectsig1==2 ; plot(handles.t,quarantized); if handles.selectsig1==3 % quaran2osig=handles.maximumosig*((2*dig2quaran/handles.noofbits)- 1); ; plot(handles.t,quaran2osig); if handles.selectsig1==4 ; if handles.selectsig1==5 ; set(handles.radiotime1,'value',handles.td1) set(handles.radiofrequency1,'value',handles.fd1)

% --- Executes on button press in radiofrequency1. function radiofrequency1_callback(hobject, eventdata, handles) % hobject handle to radiofrequency1 (see GCBO) % Hint: get(hobject,'value') returns toggle state of radiofrequency1 handles.td1=0; handles.fd1=1; if handles.selectsig1==1 ; plot(handles.x_axis,abs(handles.osig)); if handles.selectsig1==2 FQO=fftshift(fft(quarantized)/length(quarantized)); if handles.selectsig1==3 % quaran2osig=handles.maximumosig*((2*dig2quaran/handles.noofbits)- 1); FQO=fftshift(fft(quaran2osig)/length(quaran2osig)); if handles.selectsig1==4 if handles.selectsig1==5

set(handles.radiotime1,'value',handles.td1); set(handles.radiofrequency1,'value',handles.fd1); % --- Executes on button press in radiotime2. function radiotime2_callback(hobject, eventdata, handles) % hobject handle to radiotime2 (see GCBO) % Hint: get(hobject,'value') returns toggle state of radiotime2 handles.td2=1; handles.fd2=0; if handles.selectsig2==1 plot(handles.t,handles.osig) if handles.selectsig2==2 ; plot(handles.t,quarantized); if handles.selectsig2==3 ; plot(handles.t,quaran2osig); if handles.selectsig2==4 ; if handles.selectsig2==5 ; set(handles.radiotime2,'value',handles.td2) set(handles.radiofrequency2,'value',handles.fd2)

% --- Executes on button press in radiofrequency2. function radiofrequency2_callback(hobject, eventdata, handles) % hobject handle to radiofrequency2 (see GCBO) % Hint: get(hobject,'value') returns toggle state of radiofrequency2 handles.td2=0; handles.fd2=1; if handles.selectsig2==1 ; plot(handles.x_axis,abs(handles.osig)); if handles.selectsig2==2 FQO=fftshift(fft(quarantized)/length(quarantized)); if handles.selectsig2==3 FQO=fftshift(fft(quaran2osig)/length(quaran2osig)); if handles.selectsig2==4 if handles.selectsig2==5

set(handles.radiotime2,'value',handles.td2); set(handles.radiofrequency2,'value',handles.fd2); % --- Executes on selection change in popupaxes1. function popupaxes1_callback(hobject, eventdata, handles) % hobject handle to popupaxes1 (see GCBO) handles.selectsig1=get(hobject,'value'); % Hints: contents = cellstr(get(hobject,'string')) returns popupaxes2 contents as cell array % contents{get(hobject,'value')} returns selected item from popupaxes2 if handles.selectsig1==1 if handles.td1==1 plot(handles.t,handles.osig) plot(handles.x_axis,abs(handles.osig)); if handles.selectsig1==2 if handles.td1==1 ; plot(handles.t,quarantized); FQO=fftshift(fft(quarantized)/length(quarantized)); if handles.selectsig1==3 if handles.td1==1 ; plot(handles.t,quaran2osig); FQO=fftshift(fft(quaran2osig)/length(quaran2osig)); if handles.selectsig1==4

if handles.td1==1 ; if handles.selectsig1==5 if handles.td1==1 ; % --- Executes during object creation, after setting all properties. function popupaxes1_createfcn(hobject, eventdata, handles) % hobject handle to popupaxes1 (see GCBO) % handles empty - handles not created until after all CreateFcns called % Hint: popupmenu 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'); % --- Executes on selection change in popupaxes2. function popupaxes2_callback(hobject, eventdata, handles) % hobject handle to popupaxes2 (see GCBO) handles.selectsig2=get(hobject,'value'); % Hints: contents = cellstr(get(hobject,'string')) returns popupaxes2 contents as cell array % contents{get(hobject,'value')} returns selected item from popupaxes2 if handles.selectsig2==1 if handles.td2==1 plot(handles.t,handles.osig) plot(handles.x_axis,abs(handles.osig));

if handles.selectsig2==2 if handles.td2==1 ; plot(handles.t,quarantized); FQO=fftshift(fft(quarantized)/length(quarantized)); if handles.selectsig2==3 if handles.td2==1 ; plot(handles.t,quaran2osig); FQO=fftshift(fft(quaran2osig)/length(quaran2osig)); if handles.selectsig2==4 if handles.td2==1 ; if handles.selectsig2==5 if handles.td2==1 ;

% --- Executes during object creation, after setting all properties. function popupaxes2_createfcn(hobject, eventdata, handles) % hobject handle to popupaxes2 (see GCBO) % handles empty - handles not created until after all CreateFcns called % Hint: popupmenu 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'); function bitsnumber_callback(hobject, eventdata, handles) % hobject handle to bitsnumber (see GCBO) % Hints: get(hobject,'string') returns contents of bitsnumber as text % str2double(get(hobject,'string')) returns contents of bitsnumber as a double a=str2double(get(hobject,'string')); handles.noofbits=round(a); set(handles.bitsnumber,'string',handles.noofbits); % --- Executes during object creation, after setting all properties. function bitsnumber_createfcn(hobject, eventdata, handles) % hobject handle to bitsnumber (see GCBO) % 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'); % --- Executes on selection change in popupsound. function popupsound_callback(hobject, eventdata, handles) % hobject handle to popupsound (see GCBO) % Hints: contents = cellstr(get(hobject,'string')) returns popupsound contents as cell array % contents{get(hobject,'value')} returns selected item from popupsound handles.soundplay=get(hobject,'value'); if handles.soundplay==1

sound(handles.osig*handles.controlvol); axes(handles.axes3) plot(handles.t,handles.osig*handles.controlvol); if handles.soundplay==2 sound(handles.controlvol*quaran2osig); axes(handles.axes3) plot(handles.t,handles.controlvol*quaran2osig); if handles.soundplay==3 sound(handles.controlvol*filtered_osig); axes(handles.axes3) plot(handles.t,handles.controlvol*filtered_osig); if handles.soundplay==4 sound(handles.controlvol*filtered_osig); axes(handles.axes3) plot(handles.t,handles.controlvol*filtered_osig); % --- Executes during object creation, after setting all properties. function popupsound_createfcn(hobject, eventdata, handles) % hobject handle to popupsound (see GCBO) % handles empty - handles not created until after all CreateFcns called % Hint: popupmenu 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'); % --- Executes on slider movement. function slidercvolume_callback(hobject, eventdata, handles) % hobject handle to slidercvolume (see GCBO) % Hints: get(hobject,'value') returns position of slider % get(hobject,'min') and get(hobject,'max') to determine range of slider handles.controlvol=get(hobject,'value'); % --- Executes during object creation, after setting all properties.

function slidercvolume_createfcn(hobject, eventdata, handles) % hobject handle to slidercvolume (see GCBO) % handles empty - handles not created until after all CreateFcns called % Hint: slider controls usually have a light gray background. if isequal(get(hobject,'backgroundcolor'), get(0,'defaultuicontrolbackgroundcolor')) set(hobject,'backgroundcolor',[.9.9.9]);