Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
22 views
Matlab Commands For Lab
wireless network
Uploaded by
41 Pratiksha Pawar
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Matlab Commands for lab For Later
Download
Save
Save Matlab Commands for lab For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
22 views
Matlab Commands For Lab
wireless network
Uploaded by
41 Pratiksha Pawar
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Matlab Commands for lab For Later
Carousel Previous
Carousel Next
Save
Save Matlab Commands for lab For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 6
Search
Fullscreen
AA A-2 INTRODUCTION MATLAB is the powerful tool of modern scientific computations. The complex engineering problems can be solved easily with the help of MATLAB programs, Related and required commands can be drawn from respective MATLAB toolbox. { m-files corresponding to the MATLAB statement (concerned MATLAB consists o! algorithm). There are three types of windows concerned to MATLAB viz. 1. MATLAB command window. 2, MATLAB Editor / Debugger window. 3. MATLAB Figure window. MATLAB command window : This window prompts >>, indicating that L it is ready for execution of MATLAB commands. Results are displayed in command window. The command window can also be used to run small programs. 2. MATLAB Editor / Debugger : Actual program is typed in this window and saved the file with extension of mi.e., chetana.m (MATLAB command abbreviations can not be used to save user files). All comments are written after % (percentage) character and ; (semicolon) is used to end the command. MATLAB Figure window : After execution (Running) of MATLAB program, the computed figure is displayed in MATLAB figure window. EXECUTION PROCEDURE + Open MATLAB command window. + — Click on new m-file (MATLAB editor/debugger is opened with file name untitled) + Type the program. + Comments must precede with % (percentage). * Type (semicolon) at the end of each MATLAB command (optional).A-3 + No ‘end’ statement is required for MATLAB main program (if typed, user gets warning message after running the program). Click on ‘saveas’ and save the file with ‘filename.m’ in ‘work’ environment of MATLAB software. Click on ‘Tool’ and then click on ‘Run’ to execute the program (As per setting ofoptions, user finds an arrow to the data to be inputed if program is correctly typed otherwise error is displayed). Enter the data samples (if not specified in program) in MATLAB command window. Enter all data samples within the SQUARE BRACKETS and a SPACE between each sample. ‘After entering all the input data, the result is displayed in command window or figure window (As per program). Users are advised to follow the execution procedure before proceeding with MATLAB programming. M. computation tim far ATLAB programs are compact, flexible and easy to execute except the e for longer programs. As a author, users are advised to look the ntasy of MATLAB programming. LIST OF MATLAB COMMANDS ‘The following list of MATLAB commands are very useful for signal processing. Use “help” or “lookfor” for more information about commands. Command Description Basic Commands. abs (x) ‘Computes the absolute value of vector x. angle (x) Computes the phase angle of vector x in radians. axis (x) Sets the manual scaling value on plots. break Stops the execution of loops. elf Removes all the objects from current figure. ceil(x) Rounds to the nearest integer value of x. real (x) Takes the real part of each exponents of vector X- imag (2) ‘Takes the imaginary part of each exponents of vector © conj (x) Complex conjugate of each components of x- exp (p) Computes the exponential value. sum (x) Sum of components of vector x.force | log (x) 1ogi0 (x) sqrt (x) disp (x) end error format grid gtext help hold input inv legend length linspace load lookfor max min Nan ones pause pi plot rand randn rem return save size Product of components of vector x. Computes natural logarithm of x Computes the logarithm of x with base 10, Computes the squaroot of x. : Displays the tex or z Terminates the — onthe semen, Displays an error message. Displays the format of display (long or short), Adds or deletes grid lines to or from the current plot. Places the text on figure with the help of mouse, Provides on line help of MATLAB commands. Holds the current graph. Request for the data to be supplied by user. Evaluates inverse of matrix. Inserts a legend on current figure. Calculates the length of vector. Generates linearly spaced vectors. Obtain saved data from the disk. Provides search through all help entries. Determines largest element of vector. Determines smallest element of vector. Not-a-Number. Generates a vector with element value 1. Execution stops temporarily until any key is pressed. Value of 2. Generates 2-D plots. Generates random numbers uniformly, distributed in the interval 0 and 1. Generates random numbers with zero mean and unity variance. ’ Determines the reminder from matrix division. Return to the key board. Saves the variables on the disk. dimension.stem Plots the discrete values of sequence. subplot Breaks the figure window into multiple planes for multiple figure display. title Write the heading on the top of current figure. what Provides the directory listing of files. which Locates the functions and files. who Lists the current variables in the memory. whos Lists the variables in memory, their sizes and nonzero imaginary parts xlabel Write the text below the x axis of plot. ylabel Write the text vertically on y axis of plot. zeros Generates the vector with element zero. Convolution and correlation related commands conv Computes convolution of two sequences. decony Performs the operation of polynomial division. xcorr Computes the correlation between two sequences, DEFT / FFT related commands freqz Computes the complex frequency response of digital transfer function. ats Computes the discrete fourier series. rem Determines the reminder after division. mod Computes the mod value. dft Computes the N-point DFT of sequence x. idft Computes the N-point inverse DFT of x. ovrlpsav Computes the linear convolution of real time sequence by overlap save method, fft Implements radix-2 FFT algorithm. ifft Implements radix-2 inverse FFT algorithm. £f£tshift(x)| Rearrange the output of FFT so that the zero frequency component is at the center of the spectrum. Z-Transform related commands zplane Displays poles and zeros in z plane. roots Computes the roots of z polynomial.———————— a residue Determine the partial fraction of DT tr expressed by ratio of z-polynomial ‘ansfer function residuez Determine the partial fraction of DT transf: expressed by the ratio of 2” polynomial sfer function filter Implements the filter given by difference equati ation. impz Computes the impulse resi : ponse coeffi igi transfer funetion. setents of digital peaen Calculates the zeros, poles and : , gains of function in even transfer apatf Calculates the numerator and denominator coefficients of transfer function. Determines the equivalent second order representation zp2so8 from given higher order pole/zero polynomial. Filter related commands — putter Designs the digitaV/analog Butterworth filters. puttord Selects the minimum order of the digital/analog butterworth transfer function. chebyl Designs the digitaVanalog ‘Type-I Chebyshev filters. cheby2 Designs the digital/analog ‘Type-II Chebyshev filters. chebiord Selects the minimum order of digital/analog Type-1 Chebyshev transfer function. cheb2ord Selects the minimum order of the digitaVanalog Type-2 Chebyshev transfer function. ellip Designs the digital/analog elliptic filter. ellipord Selects the minimum order of digital/analog elliptic transfer function. freqs Computes the complex frequency response of analog transfer function. firl Designs lincar phase FIR filter. fir2 Designs linear phase FIR filter with any magnitude. bilinear This command converts an analog filter with zeros Z, poles (2,P,K,Fs) P and gain Kin to digital filter with sampling frequency Fs Hz. bilinear This command converts an analog filter with numerator (N,D,Fs) polynomial coefficients, denominator polynomial coefficients and sampling frequency Fs.boxcar (M) Generates M point rectangular window. bartiet(m) | Generates M point bartlet window hanning(m) | Generates M point hanning window. hamming (M) Generates M point hamming window. blackman(m)| Generates M point blackman window. kaiser (Mm) Generates M point kaiser window. kaiserord Calculates the filter order. Additional Commands Computes sine function of an array. Determines sine values. Calculates signum function. sine sin sign cos Computes cosine values. Rounds to nearest integer value. Determines reflected (folded) sequence. Computes number of floating point operation. Converts number to string representation. Generates sawtooth wave form. Generates staircase wave form. Computes discrete time wavelet transform. Computes inverse discrete time wavelet transform. Computer’ continuous time wavelet transform. round fliplr flops num2str sawtooth stairs dwt idwt cwr Note: Detailed explanation of each MATLAB command can be obtained by help or lookfor commands.
You might also like
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
From Everand
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
Mark Manson
4/5 (6125)
Principles: Life and Work
From Everand
Principles: Life and Work
Ray Dalio
4/5 (627)
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
From Everand
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
Brene Brown
4/5 (1148)
Never Split the Difference: Negotiating As If Your Life Depended On It
From Everand
Never Split the Difference: Negotiating As If Your Life Depended On It
Chris Voss
4.5/5 (932)
The Glass Castle: A Memoir
From Everand
The Glass Castle: A Memoir
Jeannette Walls
4/5 (8214)
Grit: The Power of Passion and Perseverance
From Everand
Grit: The Power of Passion and Perseverance
Angela Duckworth
4/5 (631)
Sing, Unburied, Sing: A Novel
From Everand
Sing, Unburied, Sing: A Novel
Jesmyn Ward
4/5 (1253)
The Perks of Being a Wallflower
From Everand
The Perks of Being a Wallflower
Stephen Chbosky
4/5 (8365)
Shoe Dog: A Memoir by the Creator of Nike
From Everand
Shoe Dog: A Memoir by the Creator of Nike
Phil Knight
4.5/5 (860)
Her Body and Other Parties: Stories
From Everand
Her Body and Other Parties: Stories
Carmen Maria Machado
4/5 (877)
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
From Everand
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
Margot Lee Shetterly
4/5 (954)
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
From Everand
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
Ben Horowitz
4.5/5 (361)
Steve Jobs
From Everand
Steve Jobs
Walter Isaacson
4/5 (2922)
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
From Everand
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
Ashlee Vance
4.5/5 (484)
The Emperor of All Maladies: A Biography of Cancer
From Everand
The Emperor of All Maladies: A Biography of Cancer
Siddhartha Mukherjee
4.5/5 (277)
A Man Called Ove: A Novel
From Everand
A Man Called Ove: A Novel
Fredrik Backman
4.5/5 (4972)
Angela's Ashes: A Memoir
From Everand
Angela's Ashes: A Memoir
Frank McCourt
4.5/5 (444)
Brooklyn: A Novel
From Everand
Brooklyn: A Novel
Colm Tóibín
3.5/5 (2061)
The Art of Racing in the Rain: A Novel
From Everand
The Art of Racing in the Rain: A Novel
Garth Stein
4/5 (4281)
The Yellow House: A Memoir (2019 National Book Award Winner)
From Everand
The Yellow House: A Memoir (2019 National Book Award Winner)
Sarah M. Broom
4/5 (100)
The Little Book of Hygge: Danish Secrets to Happy Living
From Everand
The Little Book of Hygge: Danish Secrets to Happy Living
Meik Wiking
3.5/5 (447)
The World Is Flat 3.0: A Brief History of the Twenty-first Century
From Everand
The World Is Flat 3.0: A Brief History of the Twenty-first Century
Thomas L. Friedman
3.5/5 (2283)
Yes Please
From Everand
Yes Please
Amy Poehler
4/5 (1987)
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
From Everand
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
Gilbert King
4.5/5 (278)
Bad Feminist: Essays
From Everand
Bad Feminist: Essays
Roxane Gay
4/5 (1068)
The Outsider: A Novel
From Everand
The Outsider: A Novel
Stephen King
4/5 (1993)
The Woman in Cabin 10
From Everand
The Woman in Cabin 10
Ruth Ware
3.5/5 (2641)
A Tree Grows in Brooklyn
From Everand
A Tree Grows in Brooklyn
Betty Smith
4.5/5 (1936)
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
From Everand
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
Viet Thanh Nguyen
4.5/5 (125)
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
From Everand
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
Victoria Walters
3.5/5 (692)
Team of Rivals: The Political Genius of Abraham Lincoln
From Everand
Team of Rivals: The Political Genius of Abraham Lincoln
Doris Kearns Goodwin
4.5/5 (1912)
Wolf Hall: A Novel
From Everand
Wolf Hall: A Novel
Hilary Mantel
4/5 (4074)
Fear: Trump in the White House
From Everand
Fear: Trump in the White House
Bob Woodward
3.5/5 (830)
On Fire: The (Burning) Case for a Green New Deal
From Everand
On Fire: The (Burning) Case for a Green New Deal
Naomi Klein
4/5 (75)
Rise of ISIS: A Threat We Can't Ignore
From Everand
Rise of ISIS: A Threat We Can't Ignore
Jay Sekulow
3.5/5 (143)
Manhattan Beach: A Novel
From Everand
Manhattan Beach: A Novel
Jennifer Egan
3.5/5 (901)
John Adams
From Everand
John Adams
David McCullough
4.5/5 (2530)
The Light Between Oceans: A Novel
From Everand
The Light Between Oceans: A Novel
M L Stedman
4.5/5 (790)
The Unwinding: An Inner History of the New America
From Everand
The Unwinding: An Inner History of the New America
George Packer
4/5 (45)
Little Women
From Everand
Little Women
Louisa May Alcott
4/5 (105)
The Constant Gardener: A Novel
From Everand
The Constant Gardener: A Novel
John le Carré
3.5/5 (109)
Related titles
Click to expand Related Titles
Carousel Previous
Carousel Next
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
From Everand
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
Principles: Life and Work
From Everand
Principles: Life and Work
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
From Everand
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
Never Split the Difference: Negotiating As If Your Life Depended On It
From Everand
Never Split the Difference: Negotiating As If Your Life Depended On It
The Glass Castle: A Memoir
From Everand
The Glass Castle: A Memoir
Grit: The Power of Passion and Perseverance
From Everand
Grit: The Power of Passion and Perseverance
Sing, Unburied, Sing: A Novel
From Everand
Sing, Unburied, Sing: A Novel
The Perks of Being a Wallflower
From Everand
The Perks of Being a Wallflower
Shoe Dog: A Memoir by the Creator of Nike
From Everand
Shoe Dog: A Memoir by the Creator of Nike
Her Body and Other Parties: Stories
From Everand
Her Body and Other Parties: Stories
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
From Everand
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
From Everand
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
Steve Jobs
From Everand
Steve Jobs
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
From Everand
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
The Emperor of All Maladies: A Biography of Cancer
From Everand
The Emperor of All Maladies: A Biography of Cancer
A Man Called Ove: A Novel
From Everand
A Man Called Ove: A Novel
Angela's Ashes: A Memoir
From Everand
Angela's Ashes: A Memoir
Brooklyn: A Novel
From Everand
Brooklyn: A Novel
The Art of Racing in the Rain: A Novel
From Everand
The Art of Racing in the Rain: A Novel
The Yellow House: A Memoir (2019 National Book Award Winner)
From Everand
The Yellow House: A Memoir (2019 National Book Award Winner)
The Little Book of Hygge: Danish Secrets to Happy Living
From Everand
The Little Book of Hygge: Danish Secrets to Happy Living
The World Is Flat 3.0: A Brief History of the Twenty-first Century
From Everand
The World Is Flat 3.0: A Brief History of the Twenty-first Century
Yes Please
From Everand
Yes Please
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
From Everand
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
Bad Feminist: Essays
From Everand
Bad Feminist: Essays
The Outsider: A Novel
From Everand
The Outsider: A Novel
The Woman in Cabin 10
From Everand
The Woman in Cabin 10
A Tree Grows in Brooklyn
From Everand
A Tree Grows in Brooklyn
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
From Everand
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
From Everand
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
Team of Rivals: The Political Genius of Abraham Lincoln
From Everand
Team of Rivals: The Political Genius of Abraham Lincoln
Wolf Hall: A Novel
From Everand
Wolf Hall: A Novel
Fear: Trump in the White House
From Everand
Fear: Trump in the White House
On Fire: The (Burning) Case for a Green New Deal
From Everand
On Fire: The (Burning) Case for a Green New Deal
Rise of ISIS: A Threat We Can't Ignore
From Everand
Rise of ISIS: A Threat We Can't Ignore
Manhattan Beach: A Novel
From Everand
Manhattan Beach: A Novel
John Adams
From Everand
John Adams
The Light Between Oceans: A Novel
From Everand
The Light Between Oceans: A Novel
The Unwinding: An Inner History of the New America
From Everand
The Unwinding: An Inner History of the New America
Little Women
From Everand
Little Women
The Constant Gardener: A Novel
From Everand
The Constant Gardener: A Novel