### Create a StudySoup account

#### Be part of our community, it's free to join!

Already have a StudySoup account? Login here

# Intro to Communication Systems EEL 4512C

USF

GPA 3.57

### View Full Document

## 30

## 0

## Popular in Course

## Popular in Electrical Engineering

This 7 page Class Notes was uploaded by Mr. Chelsie Bergstrom on Wednesday September 23, 2015. The Class Notes belongs to EEL 4512C at University of South Florida taught by Charles Baylis in Fall. Since its upload, it has received 30 views. For similar materials see /class/212711/eel-4512c-university-of-south-florida in Electrical Engineering at University of South Florida.

## Reviews for Intro to Communication Systems

### What is Karma?

#### Karma is the currency of StudySoup.

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/23/15

EEL 4512 INTRODUCTION TO COMMUNICATION SYSTEMS INTRODUCTION TO MATLAB This handout will introduce some basic procedures and capabilities of MATLAB Work along with the handout and this will give you a primer into using the software A er starting MATLAB the following window will appear To get started select mums Help 0 Demos from HElp menu Home Directory 3233 1223 3 2 M Na M jma an E H mm n M lmrm quot4 gHerp rm I MIn lmM n el The command window on the right is where execution of commands assignmenw of Variables and other operations are performed The command history shows the history of the commands The upper le window shows the les in the present home directory the home directory is shown in the upper right Any functions called by the program should be in this directory Let s begin by performing some simple mathematical operations in the command window The rst operation will be the simple addition of two numbers We will rst perform the addition of two numbers Type 3 1 followed by Enter in the command window Then type 3 1 followed by Enter in the command window Finally the sum is computed by typing Xy and pressing enter The sum appears below the command The command window should look like this when nished gtgtxl X l gtgtyl y l gtgtxy ans 2 gtgt NeXt we will learn how to de ne functions and perform operations on functions in MATLAB Following the order of commands below we will de ne Xt t yt t l and then perform addition and multiplication operations Finally the plot of the addition and multiplication is performed The rst step is to de ne the values of the independent variable t The following establishes t from 5 to 5 in steps of001 gtgt t50015 When you press Enter you will see a large amount of numbers printed on the screen These are the values of t Now type the same command in the screen again but with a semicolon following Upon pressing Enter you will see that the numbers are not printed The semicolon causes the value of the computation you typed to not be printed on the screen however the operation is equally valid gtgt t50015 Now you can de ne Xt and yt gtgt Xt gtgt yt1 For the addition de ne mt Xt yt and nt Xtyt gtgt mxy gtgt nXy Notice the period After the X in the multiplication operation This is necessary because X and y are matrices in MATLAB so a simple Xy would cause MATLAB to try to compute the matrix multiplication of the column vectors X and y Obviously this is impossible because the inner matriX dimensions do not agree What we desire is a component by component multiplication which this dot allows to be performed Now let s plot Xt yt mt and nt in a single plot b0X with four subplots This can be performed by using the builtin subplot function in MATLAB To learn about any function type help followed by the function An eXplanation will appear in the command window eXplaining the function along with the necessary input arguments and the outputs of the function gtgt help subplot SUBPLOT Create axes in tiled positions H SUBPLOTmnp or SUBPLOTmnp breaks the Figure window into an m by n matrix of small axes selects the p th axes for for the current plot and returns the axis handle The axes are counted along the top row of the Figure window then the second row etc For example SUBPLOT2ll PLOTincome SUBPLOT 2 12 PLOT outgo plots income on the top half of the window and outgo on the bottom half If the CurrentAxes is nested in a uipanel the panel is used as the parent for the subplot instead of the current figure SUBPLOTmnp if the axis already exists makes it current SUBPLOTmnp39replace39 if the axis already exists deletes it and creates a new axis SUBPLOTmnp39align39 places the axes so that the plot boxes are aligned instead of preventing the labels and ticks from overlapping SUBPLOTmnP Where P is a vector specifies an axes position that covers all the subplot positions listed in P SUBPLOTH where H is an axis handle is another way of making an axis current for subsequent plotting commands SUBPLOT39position39left bottom width height creates an axis at the specified position in normalized coordinates in in the range from 00 to 10 SUBPLOTmnp PROPl VALUEi PROPZ VALUE2 sets the specified property value pairs on the subplot axis To add the subplot to a specific figure pass the figure handle as the value for the 39Parent39 property If a SUBPLOT specification causes a new axis to overlap an s he existing axis is deleted 7 unless the position e n l the statement SU39BPLOT121 deletes all ex the left side of the F1 side 7 unless there is an axes there w matches the position of the new axes and 39 w n in which case all other overlapping axes will be deleted and the matching axes will become the current axes p e isting axes overlapping t a SU39BPLOT111 is an exception to the rules above and is not identical in be vior to SUBPLOT111 For reasons of backwards compatibility it is a special case of subplot which does not immediately create an axes but instead sets up the figure so that the default position This syntax does not r is an error to s ecify a re nt The delayed CLF RESET is accomplished by setting the flgure39s NextPlot to 39replace39 See also gca gcf axes figure uipanel Reference page in Help browser doc subplot Thus subplot22l plot tx will form a plot box for the function that is a 2 x 2 army of subplots The plot to be used for the plot at present will be the rst plot the fast row is counted Ist followed by the second row x will be plotted on the venical axis witht on the hoIizontal axis The command line of this is as follows gtgt subplot22 l plottx The plot box pops up and appeals as follows us 7 gammyWJm mar m d in mm an M i m El mum E mum at m i w p gs madam 2m slum vltk4 MM 3 am 39wa mman Erika The next step is the development ofa program or M le to perform all ofthese tasks The commands are the same as those used in the command Window but the M le can be repeatedly called and thus this is more convenient for operations With a larger number of commands To create a neW M le go to File 9 New 9 M le lose Command wmgw Data Man To get started 5212 mm Help 0 Demos from the HElp menu 2 a mumseayehena m LN empmuzam mm Bzsus 155 pm We P10 P10 4m may W4 gmquot M g a El 0 E H auwemwm mammw Mnnna M szyt 15W A new window will open You can begin typing code into this window We would like to create a program that de nes the functions Xt and yt then calculates the sum mt and product nt of the two functions and plots all four functions The m le code appears as follows function sumproduct t 50015 You write comments like this with a percent sign Xt39 Plot the first input function Xt figure This command opens a new graph or figure subplot221 plottx This sets up the first plot title39The First Signal39 This titles the graph Xlabel39t seconds39 xlabel labels the horizontal axis ylabel39xt39 ylabel labels the vertical axis Plot the second input function yt subplot222 plotty Form plot xaxis anis title39The Second Signal39 Xlabel39t seconds39 ylabel39yt39 Plot the sum mt Xtyt subplot223 plott title39The Sum39 Xlabel39t seconds39 ylabel39mt39 Plot the product ntxtyt subplot224 plottn title39The Product39 Xlabel39t seconds39 ylabel39nt39 After you have typed in this code go to File 9 Save and type in the le name sumproduct this will save the le as sumproductm u the mam MATLAB wmduw and type Sumpmduct at the ptumpt The fuheuuh wtu exeeute Retum t and shuuld result m aplut that appears as ulluws he est use W es 395 MQQWME DEHE The Fhst StghaT Aglzl The Seeuhu StghaT 5 g D n T n e n t seeuhue t seeuhue The Sum The Ptuuuet 2n Tn E E m n n V D r tseeuhus u tseeuhus press the upward armwkey Ths teeehtets the pteuhuus cummandrlme statement Thus yuu eah run Lhs pmgzm agam hy ptessmg the up muw fulluwed hy Ema

### BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.

### You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

#### "I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

#### "I used the money I made selling my notes & study guides to pay for spring break in Olympia, Washington...which was Sweet!"

#### "Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

#### "Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.