You are on page 1of 109

NFC Institute of Engineering and

Technology Multan Pakistan

Lab Manual

Introduction to Computing

CS-112
List of Experiments

Lab No Title

1 To Identify the peripherals of a computer, components in a CPU and its functions.

2 To learn about browsers settings, bookmarks, search toolbars and pop up blockers

3 To learn about how to Install windows 7 on a personal computer.

4 Overview of MS Office word, Formatting Text & Documents, Inserting Header & footer, Bullets &
Numbering and to Cut, Copy & Paste command

Working with Graphics, inserting, resizing, cropping & deleting of shapes, columns, Smart art
5
graphics, Tables and commands about tables in MS word

Overview of excel, creating work books & sheets, Selecting cell & ranges, Modifying
6
Spreadsheets Automatically Fill Data, Cell borders & style and using basic formulas in excel.
Overview of Power point, adding slides, formatting slides, applying clip art, translation of slides,
7 animation and inserting tables and charts in slides

To learn about basic functions and applications of Hub, Switch, Bridge, Routers, Gateway
8
and Network cards

Overview of thinking and process mapping, visio interface, page setup, basic drawing skills, adding &
9
deleting shapes and saving drawing
To learn about selecting, moving, resizing, rotating & deleting Shapes, working with text, connecting and
10 grouping of shapes

11 Introduction to Turbo C IDE and Programming Environment., C Compiler & C standard library

To understand the C Preprocessor directives C Preprocessor directives, Header Files. Data Types &
12
Format specifiers.

13 To Use of variables. Constants and operators. & Gech() ,Getche() & Getchar( ) .
Familiarization with Matlab software and minimal Matlab calculation Session
14

15 PART A: Familiarization
Introduction withArrays
to Matrices and Matlab screen
2 PART B: A minimal Matlab Session
PART A:Dealing with polynomials & Partial fraction expansion
PART B:Plotting in Matlab
16
PART A:C:Solving ordinary
Familiarization differential
with equation (ODE) symbolically
Matlab screen
2 PART B: A minimal Matlab Session

PART A: Familiarization with Matlab screen


2 PART B: A minimal Matlab Session
Lab 1
Objective: To Identify the peripherals of a computer, components in a CPU and its functions
Apparatus: Personal Computer
Theory:
What is a Motherboard?
The motherboard serves to connect all of the parts of a computer together. The CPU, memory, hard
drives, optical drives, video card, sound card and other ports and expansion cards all connect to the
motherboard directly or via cables. The motherboard can be thought of as the "back bone" of the
computer. The motherboard is mounted inside the case, opposite the most easily accessible side. It is
securely attached via small screws through pre-drilled holes. The front of the motherboard contains
ports that all of the internal components connect to. A single socket/slot houses the CPU. Multiple
slots allow for one or more memory modules to be attached. Other ports reside on the motherboard
which allows the floppy drive, hard drive and optical drive to connect via ribbon cables. Small wires
from the front of the computer case connect to the motherboard to allow the power, reset and LED
lights to function. Power from the power supply is delivered to the motherboard by use of a specially
designed port.

Also on the front of the motherboard are a number of peripheral card slots. These slots are where
most video cards, sound cards and other expansion cards are connected to the motherboard. On the
left side of the motherboard (the side that faces the back end of the case) are a number of ports. These
ports allow most of the computer's external peripherals to connect such as the monitor, printer,
keyboard, mouse, speakers, phone line, network cable and more. Most motherboards also include
USB and FireWire ports here that allow compatible devices to connect to your computer when you
need them - devices like digital still and video cameras.

Expansion Cards:
Special expansion cards are one way to add new types of ports to an older computer or to expand
the number of ports on your computer. Like other expansion cards, these cards clip into an open
expansion slot on the motherboard

Figure: An expansion card with 3 USB ports and 2 Fire wire ports

Video (Graphics) Card:


A dedicated video card (or video adapter) is an expansion card installed inside your system unit to
translate binary data received from the CPU or GPU into the images you view on your monitor. It is
an alternative to the integrated graphics chip. Modern video cards include ports allowing you to
connect to different video equipment; also they contain their own RAM, called video memory. Video
cards also come with their own processors or GPUs. Calls to the CPU for graphics processing are
redirected to the processor on the video card, significantly speeding up graphics processing. Updating
to a dedicated graphics card offloads work from the CPU and system RAM, so not only will graphics
processing be faster, but the system’s overall performance will improve. The video card also controls
the number of colors your monitor can display. The number of bits the video card uses to represent
each pixel on the monitor (referred to as the bit depth) determines the color quality of the image
displayed. The more bits available, the better the color detail of the image.

Figure: A Graphics card with output ports for both digital and analog video. The GPU sits under the fan (red) and
Heatsink

Input/Output (I/O) devices


These allow you to send information to the computer or get information from the computer.

CentralProcessing Unit
CPU or Processor for short. The brain of a computer. Approximately 1.5 in X 1.5 in. Does all the
computation/work for the computer
Memory
Although memory is technically any form of electronic storage, it is used most often to identify fast, temporary
forms of storage. Accessing the hard drive for information takes time. When the information is kept in
memory, the CPU can access it much more quickly

Random Access Memory


RAM. Where information is stored temporarily when a program is run. Information is automatically
pulled into memory, we cannot control this. RAM is cleared automatically when the computer is
shutdown or rebooted. RAM is volatile (non-permanent).
Read Only Memory
ROM. More permanent than RAM. Data stored in these chips is nonvolatile -- it is not lost when
power is removed. Data stored in these chips is either unchangeable or requires a special operation to
change. The BIOS is stored in the CMOS, read- only memory.

Hard Drive
Where you store information permanently most frequently. This is also nonvolatile.
Serial Port
Often used to connect a older mice, older external modems, older digital cameras, etc to the computer.
The serial port has been replaced by USB in most cases. 9-pin connector. Small and short, often gray
in color. Transmits data at 19 Kb/s.

Monitor Ports
Used to connect a monitor to the computer. PCs usually use a VGA (Video Graphics Array) analog
connector (also known as a D-Sub connector) that has 15 pins in three rows. Typically blue in color.
Because a VGA (analog) connector does not support the use of digital monitors, the Digital Video
Interface (DVI) standard was developed. LCD monitors work in a digital mode and support the DVI
format. At one time, a digital signal offered better image quality compared to analog technology.
However, analog signal processing technology has improved over the years and the difference in
quality is now minimal.
Parallel Port
Most often used to connect a printer to the computer. 25-pin connector. Long and skinny, often pink
in color. Transmits data at 50-100 Kb/s.

USB Port
Universal Serial Bus. Now used to connect almost all peripheral devices to the computer. USB 1.1
transmits data at 1.5 Mb/s at low speed, 12 Mb/s at full speed. USB 2.0 transmits data at 480 Mb/s.

Firewire/ IEEE 1394 Port


Often found on Apple Computers. Often used with digital camcorders. Firewire transmits data at
400 Mb/s. Firewire 1394B (the new firewire) transmits data at 3.2 Gb/s.

PS/2 Port
sometimes called a mouse port, was developed by IBM. It is used to connect a computer mouse or
keyboard. Most computers come with two PS/2 ports.

Ethernet Port
This port is used for networking and fast internet connections. Data moves through them at speeds of
either 10 megabits or 100 megabits or 1 gigabit (1,000 megabits) depending on what speed the
network card in the computer supports. Little monitor lights on these devices flicker when in use.

Power Supply
Gives your computer power by converting alternating current (AC) supplied by the wall connection
to direct current (DC).

Sound Card
Used to input and output sound under program control. Sound cards provide better sound quality
than the built in sound control provided with most computers.
Network Card
Used to provide a computer connection over a network. Transmit data at 10/100/1000 Mb/s.

CD ROM
A device used to read CD-ROMs. If capable of writing to the CD-ROM, then they are usually
referred to as a ‘burner’ or CD-RW.

Conclusion
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
Lab 2
Objective: To learn about browsers settings, bookmarks, search toolbars and pop up blockers

Apparatus: Personal Computer, Internet Browsers


Theory:
 Web browser provides the means to the searching and also helps to download the web content.
 Web browsers support most of the famous Internet Protocols like HTTP,FTP.
 Common file formats a browser accepts are HTML
 Well known browsers natively support a variety of other formats in addition to HTML such as
JPEG, PNG,GIF image formats
 Different web browsers available in the market are:
 Silver Smith
 Mosaic
 Netscape
 Mozilla
 Opera
 Lynx
 Safari

Bookmark:

Each web browser is built-in with the support of Internet Bookmarks which serve as a named anchor primarily
to URLs. The primary purpose of this book mark is to easily catalog and access web pages that the web
browser user has visited or plans to visit, without having to navigate the web to get there. Pop-up Blockers:
Pop-ups are a form of online advertising on the WWW intended to attract the attention of the users. These
pop ups are hosted on the web sites which are frequently visited by the netizens. These pop ups are activated
when these web sites open a new web browser window and there by displaying the advertisement

Plug-ins:

A plug-in is a software component program that interacts with a main application to provide a better
integration of the media. The basic difference between application programs and plug-ins is that multimedia
files are launched in a separate window where as in plug-ins multimedia play in the browser window.
Few famous plug-ins are:
 Apple Quick Time
 Macromedia flash
 Microsoft Media Player
 Adobe Shockwave
 Sun Micro systems Java Applet
PROCEDURE:

LAN Proxy Settings:


 select tools menu in Internet Explorer
 Select Internet Options
 Select Connections
 You end up in two options
 Dial-up and virtual network settings
 LAN setting
 The selection at this step is dependent on the kind of connection you are trying to configure. They are:
 Dial-up modem connection
 LAN connection
 DSL or Cable modem

b) How to access the websites and email& Search Engines & various threats on the internet and would
be asked to configure their computer to be safe on the internet, Antivirus downloads to avoid viruses
and/or worms.

PURPOSE: To know what search engines are and how to use the search engines.
A search engine can be defined as a web site with tools which help you to find information on the internet
Function of a search engine You can find anything from a schedule of White house tours to instructions for
removing stains from clothes.

Limitations:

Search engines visit web sites only several weeks. Search engines cannot see information in other data bases
later on.

On the internet a search engine is a coordinated set of programs that includes: A spider (crawler or bot) that
goes to every page or representative pages on every web site that wants to be searchable and reads it , using
hypertext links on each page to discover and read site’s other pages.

Pros:
 You can select the search terms
 You can use the same search terms with multiple search engines
 You can change search terms as much as you wish
 You will normally receive numerous links
 Its fast

Cons:
 There are so many different search engines it may be difficult to choose
 You will normally receive too many links often making it difficult to identify the most relevant sites.
 The vast majority of links may be only marginally relevant or altogether irrelevant

EX:
 Alta Vista
 Ask Jeeves
 Google
 Lycos
Etc..
Meta Search Engines:
Meta search engines or “met crawlers” don’t crawl the web themselves. Instead they search the resources of
multiple search engines by sending a search to several search engines at once aggregating the result.

Pros:
 You only need to use one search tool which is time- efficient
 You only need to learn how to use one search engine reducing learning curve
 You benefit from the difference among several search tools at once

Cons:
 Meta search services may not be able to leverage each individual search engines full range of query tools
resulting in less refined searches
 You cannot personally select the search engines queried by meta search services.

Viruses and/or worms.

PURPOSE: To learn various threats on the internet and configure the computer to be safe on the internet.
THEORY:
Antivirus:
Antivirus software is a program that either comes installed on your computer or that you purchase and install
yourself. It protects your computer against most viruses, worms, Trojan horses and other unwanted invaders
that can make your computer sick.
Firewall

firewall is a special software or hardware designed to protect a private computer network from unauthorized
access. A firewall is a set of related programs located at a network gateway server which protects the
resources of the private network from users from other networks.
PROCEDURE:
Installing Symantec antivirus for Windows:
 Insert Symantec antivirus CD into your CD drive
 Double click on the Symantec-setup.exe
 The installer will open
 Click next to proceed
 License agreement will open .Click I accept the terms of the license agreement and then click next.
 Follow the instruction on the screen to complete the installation.

Get Computer Updates:


 Click start> settings>control panel
 Click Automatic Updates icon to open Automatic Updates dialog box
 Check the box Keep my computer up to date
 Choose a setting
 Click OK

Block Pop ups:


 In the IE open tools>pop-up blocker
 Click on Turn on Pop- up blocker

Windows Firewall:
 Go to Start>control panel>Network and Internet Connections>windows firewall
 In the general tab check the On(recommended) box
 If you don’t want any exceptions check on Don’t allow exceptions box

THEORY:

 Identify and explain the components required to establish a network


 Establish internet connection and create a new email id , send mail and attachment file to other mail
account
 Define search engine. List the various search engines. Navigate through any of the search engine like
Google and explore its features.
 Download a file from the internet. Write the various steps involved in downloading
 What is Antivirus software? List a few popular anti-virus kits available.
 Explain the functionality of the firewall quoting a few examples

Conclusion
Lab 3
Objective: To learn about how to Install windows 7 on a personal computer
Apparatus: Personal Computer, windows 7 CD
Theory:
Installing Windows 7

If you have recently purchased a new computer, you may be able to upgrade using Windows Anytime
Upgrade. See Windows Anytime Upgrade(link) for detailed instructions. The instructions that follow
assume that you have downloaded the Windows 7 software and have already burned the IMG file you
received to a DVD. If you have not already burned the IMG file, see Working w ith Ima ge File s.
The instructions also assume that you are running Windows XP or Vista.

Pre-installation information

Important: You need to prepare your computer before initiating the installation of the Windows 7.
Since you are installing a completely new operating system, all programs that are currently on
your computer will be deleted.

1. Back up all of your all your files and folders onto an external source such as a DVD, CD, Jump
Drive, External Hard Drive, thumbdrive or USB Drive. If you have a second partition of your
hard drive, you can copy and paste your data to this partition including any previously
downloaded software.
2. Make a note of all your install files for any programs on your computer such as programs
downloaded and paid for from the internet. CD/DVD installation programs (IE Office, Project
Professional) and the licenses for these products such as license keys, serial numbers, activation
codes and product keys. These programs will need to be reinstalled later.
3. Make sure you write down the Product Key for Windows 7. You will need this number to
complete the activation.

 Sign in to the website from where you purchased the software


 At the top of the page, click the Your Account link.
 In the Order History section, select the software and click the View Details link. The Product Key is
displayed.
 Write it down.

4 If you are using an external device to back up your files, disconnect the device.

INSTALLING WINDOWS 7

You need to have at least 10GB to install. Check the properties of the C Drive to make sure you
have enough space before you begin.

Installing Windows 7 | Confidential | 7 March 2013 | 1


To install Windows 7:

1. Place the DVD with the burned IMG file on it into the DVD drive. Alternatively, if your
image has been burned to a USB device, the following instructions also apply.
2. Restart your computer.

3. During the booting process, press the appropriate button to view the boot menu. This will
be different for every computer.
4. Select the boot device in which your Windows software is on. i.e. DVD or USB device.

5. When the monitor displays “Press any key to boot off CD….”, press any key on the keyboard

The Install Windows window is displayed. Click the arrow beside Install now

Installing Windows 7 | Confidential | 7 March 2013 | 2


The message Setup is copying temporary files…is displayed

6 On the Get important updates for installation window, select Go online….

Installing Windows 7 | Confidential | 7 March 2013 | 3


The Searching for installation updates window is displayed.

7 Click the I accept the license terms check box.


8 Click the Next button.

Installing Windows 7 | Confidential | 7 March 2013 | 4


Note: Because you have a Windows version that is not eligible for upgrade, you will need to do a
9 Click Custom (advanced).

Note: You must have at least 10GB of space available to do a custom installation of Windows 7.

10 Click Disk 0 Partition 1(C:).

Installing Windows 7 | Confidential | 7 March 2013 | 5


11 Click Custom (advanced).

Note: You must have at least 10GB of space available to do a custom installation of Windows 7.

12 Click Disk 0 Partition 1(C:).

Installing Windows 7 | Confidential | 7 March 2013 | 6


13 Click the Next button. The Install Windows program displays a warning that previous
Windows programs may not be accessible.

14 Click the OK button. The Installing Windows window is displayed.

SETTING UP WINDOWS 7
After the installation is complete, you will need to:
Set up Windows updates.

1. Set up the computer name with the first user account.


2. Input the date and time including time zone.

Installing Windows 7 | Confidential | 7 March 2013 | 7


3. Choose the network type the computer is located on.
Depending on your computer, you may be required to enter your Product Key
now. Enter your Product Key.
4. Click the Next button. A confirmation window is displayed.
5. Close the confirmation

window. Your system is now ready to be used.


Note: If the Product Key is not required at this point, follow the instructions in the Post Installation Information
section below.

Post-installation information
Note: If there were any files left on your hard drive before you started the installation process, they
will be found in C:\Windows.old. You will need to reinstall all your previous programs.

To install your key and activate windows:

1. Click Start.
\
2. Right click on Computer. A pop-up menu is displayed.
3. Click Properties. The properties of Windows 7 are displayed.

Installing Windows 7 | Confidential | 7 March 2013 | 8


4. At the bottom of the screen, beside Product ID, click Change product key. The
Windows Activation window is displayed

4. Beside Product Key, enter the new product key in the text box. The product key is
visible on the WebStore when you view the complete summary of your order under
Your Account.

Installing Windows 7 | Confidential | 7 March 2013 | 9


5. Click the Next button. A confirmation window is displayed.

6. Close the confirmation window.

Your system is now ready to be used.

Conclusion
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________

Installing Windows 7 | Confidential | 7 March 2013 | 10


Lab 4
Objective: Overview of MS Office word, Formatting Text & Documents, Inserting Header &
footer, Bullets & Numbering and to Cut, Copy & Paste command

Apparatus: Personal Computer, Microsoft Office Word


Theory:
Microsoft Word 2010 is a word-processing program, designed to help you create professional-
quality documents. With the finest document- formatting tools, Word helps you organize and write
your documents more efficiently. Word also includes powerful editing and revising tools so that
you can collaborate with others easily.

The Ribbon
Understanding the Ribbon is a great way to help understand the changes between Microsoft 2003
to Microsoft 2010. The ribbon holds all of the information in previous versions of Microsoft Office
in a more visual stream line manner through a series of tabs that include an immense variety of
program features.
Home Tab
This is the most used tab; it incorporates all text formatting features such as font and paragraph
changes.

Insert Tab
This tab allows you to insert a variety of items into a document from pictures, clip art, tables and
headers and footers.

Page Layout Tab


This tab has commands to adjust page elements such as margins, orientation, inserting columns,
page backgrounds and themes.
Reference Tab
This tab has commands to use when creating a Table of Contents and citation page for a paper. It
provides you with many simple solutions to create these typically difficult to produce documents.

Mailing Tab
This tab allows you to create documents to help when sending out mailings such as printing
envelopes, labels and processing mail merges.

Review Tab
This tab allows you to make any changes to your document due to spelling and grammar issues.
It also holds the track changes feature which provides people with the ability to make notes and
changes to a document of another person.

View Tab
This tab allows you to change the view of your document to a different two page document or
zoom.
GettingStarted
Now that you have an understanding of where things are located, let’s look at the steps needed to create
a document.

OpeningOutlook
You may have a shortcut to Word on your desktop, if so double click the
icon and Word will open. If not
follow the steps below:
1. Click on the Start button
2. HighlightPrograms
3. Highlight Microsoft Office
4. Click on Microsoft Word 2010

Create a New Document


1. Click the File tab and then click
New.
2. Under Available Templates,
click Blank Document.
3. Click Create.

Using Templates
Word 2010 allows you to apply built-in templates from a wide selection of popular Word templates,
including resumes, agendas, business cards, and faxes.
To find and apply a template in Word, do the following:
1. On the File tab, click New.
2. Under Available Templates, do one of the following:
To use one of the built-in templates, click Sample Templates, click the template that you want,
and then click Create.
To reuse a template that you’ve recently used, click Recent Templates, click the template that
you want, and then click Create.
To find a template on Office.com, under Office.com Templates, click the template category that
you want, click the template that you want, and click Download to download the template from
Office.com to your computer.
3. Once you have selected your template you can modify it in any way to create the document you
want.
NOTE: You can also search for templates on Office.com from within Word. In the Search Office.com
for templates box, type one or more search terms, and then click the arrow button to search.

Opening a document
1. Click the File tab, and then click Open.
2. In the left pane of the Open dialog box, click the drive or folder that contains the document.
3. In the right pane of the Open dialog box, open the folder that contains the document that you want.
4. Click the document and then click Open.
Cut, Copy and Paste
If you would like to remove text from your document you can copy or cut the text
from the document. Simply highlight the text and go to the Home tab in the
Clipboard group and click Cut or Copy. You can also right click on your mouse
and select Cut or Copy.

Pasting Text
If you Copy text, you typically need to Paste it somewhere. The Paste feature in
2010 is much more detailed than in previous versions of Word. When you paste content, the Paste
Options button provides different options, depending on the source of the content.
Keep Source Formatting: This option preserves the look of the original text.
Keep Text Only: This option removes all the original formatting from the text.
Link & Keep Source Formatting: This option preserves the look of the original text, and it
maintains a link to the source file and updates the pasted text with any changes that are made to the
source file.
Link & Use Destination Styles: This option formats the text to match the style that’s applied where
the text is pasted. It also maintains a link to the source file and updates the pasted text with any
changes that are made to the source file.
Merge Formatting: This option changes the formatting so that it matches the text that surrounds it.
Picture: This option inserts the text as an image.
Use Destination Styles: This option formats the text to match the style that’s applied where the text
is pasted.
Use Destination Theme: This option formats the text to match the theme that’s applied to the
document where the text is pasted.
To Paste, click on the area you want your information to be inserted and either go to the Home tab in the
Clipboard group and click Paste or right click on your mouse and select Paste.

Undo
The Quick Access Toolbar holds a variety of commands right at you finger tips. It is located in the top
left of the document above the File and Home tab.
You can add or remove command by clicking on the arrow
to the right of the Quick Access Toolbar.
If you make an error in your document click on the Undo command and it will remove the last
thing you did.

Show/Hide Formatting Marks


The Show/Hide command allows you to see every time you hit the space bar, hit enter or tab. This
feature can be quite useful when creating documents to understand where everything is placed within
your document and see if any errors have been made.

On the Home tab, in the Paragraph group, click


Show/Hide.
FormattingText
Formatting a document can range from modifying text size to adding graphics. It is easy to add creative
touches to any document with the options Microsoft Word has to offer.

Modifying Fonts
The Font Group allows you to change your text font style,
size, color and many other elements.
1. Highlight the text you would like to modify.
2. Click on the drop down arrow of font style and font size
and select the changes you would like to make.
3. While text is highlighted you can also click on the color, bold, italics or underline commands to modify
the text even more.

Change Text Case


You can change the case of selected text in a document by clicking a single button called Change Case
on the ribbon.
1. Highlight the text for which you want to change the case.
2. On the Home tab, in the Font group, click Change Case.
3. Choose an option from the dropdown list, which includes
Sentence case, lowercase, UPPERCASE, Capitalize
Each Word, and tOGGLE cASE.

Adding text effects


1. Select the text that you want to add an effect to.
2. On the Home tab, in the Font group, click Text Effect.
3. Click the effect that you want.
For more choices, point to Outline, Shadow,
Reflection, or Glow, and then click the effect that you
want to add.

Remove text effects


1. Select the text that you want to remove an effect from.
2. On the Home tab, in the Font group, click Clear
Formatting.

Format Painter
The Format Painter feature allows you to quickly copy a format that you have applied
to text already in your document.
1. Select the text or graphic that has the formatting that you want to copy.
2. On the Home tab, in the Clipboard group, single click Format Painter. The pointer
will change to a paintbrush icon.
3. Bring your cursor to the text or graphic that you want to format and click on the text.
4. To stop formatting, press ESC or click on the Format Painter command again.
NOTE: Double-click the Format Painter button if you want to change the format of
multiple selections in your document.
Clear Formatting
To get rid of all the styles, text effects, and font formatting in your document, do the following:
1. Select the text that you want to clear the formatting from. Or press CTRL+A to select everything in
the document.
2. On the Home tab, in the Font group, click Clear Formatting.
NOTE: The Clear Formatting command will not
remove highlighting from your text. To clear
highlighting, select the highlighted text, and then click
the arrow next to Text Highlight Color and click No
Color.

FormattingDocuments
Adjusting Line Spacing
The default spacing is 1.15 line spacing and 10 points after each paragraph. The default spacing in
Office Word 2003 documents is 1.0 between lines and
no blank line between paragraphs.

The easiest way to change the line spacing for an entire


document is to highlight the paragraphs or entire
document that you want to change the line spacing on.
1. On the Home tab, in the Paragraph group, click
Line Spacing.
2. Do one of the following:
Click the number of line spaces that you want.
For example, click 1.0 to single-space with the spacing that is used in earlier
versions of Word. Click 2.0 to double-space the selected paragraph. Click
1.15 to single-space with the spacing that is used in Word 2010.
Click Remove Space Before Paragraph to remove any additional
lines added after each paragraph as a default
NOTE: If a line contains a large text character, graphic, or formula, Word
increases the spacing for that line. To space all lines evenly within a
paragraph, use exact spacing and specify an amount of space that is large
enough to fit the largest character or graphic in the line. If items appear cut
off, increase the amount of spacing.

Page Orientation You can choose either portrait (vertical) or landscape (horizontal) orientation for all or
part of your document.
Change Page Orientation
1. On the Page Layout tab, in the Page Setup group,
click Orientation.
2. Click Portrait or Landscape.
Different Page Orientations on Same Document
1. Highlight the pages or paragraphs that you
want to change to portrait or landscape
orientation.
2. On the Page Layout tab, in the Page Setup
group, click Margins.

1. Click Custom Margins at the bottom of the


drop down menu.
2. A Page Setup dialog box will appear.
3. On the Margins tab, click Portrait or
Landscape.
4. In the Apply to list, click Selected text or This
point forward.
NOTE: If you select some but not all of the text on
a page to change to portrait or landscape
orientation, Word places the selected text on its
own page, and the surrounding text on separate
pages.

Page Margins
Page margins are the blank space around the edges of the page. In general, you insert text and graphics
in the printable area inside the margins When you change a document’s page margins, you change
where text and graphics appear on each page. You can change the page margins either by choosing
from one of Word’s predefined settings in the Margins gallery or by creating custom margins.

Setting Predefined Page Margins


1. On the Page Layout tab, in the Page Setup group, click
Margins. The Margins gallery drop down menu will appear.
2. Click the margin type that you want to apply.

Create Custom Margins


1. On the Page Layout tab, in the Page Setup group, click
Margins.
2. At the bottom of the Margins gallery drop down menu, click
CustomMargins.
3. The Page Setup dialog box will appear.
4. Enter new values for the margins in all or some of the Top,
Bottom, Left or Right text boxes.
5. Click OK
NOTE: Most printers require a minimum width for margin settings, because they can't print all the way to
the edge of the page. If you try to set margins that are too narrow, Microsoft Word displays the message
One or more margins are set outside the printable area of the page.

Page Breaks
Word automatically inserts a page break when you reach the end of a page. If you want the page to
break in a different place, you can insert a manual page break.
Inserting a Page Break
1. Click where you want to start a new page.
2. On the Insert tab, in the Pages group, click Page Break.

NOTE: You can also insert breaks into your document by going to the Page
Layout tab, Page Setup group and clicking on the Breaks command to view a
variety of page and section breaks you can insert into your document.

Deleting a Page Break


You cannot delete the page breaks that Word inserts automatically; you can only delete a page break
that you insert manually.
1. Go to the page break you would like to remove.
2. Select the page break by clicking in the margin next to the dotted line.

3. Press the DELETE key on your keyboard.

Headers, Footers, and Page Numbers


You can add headers, footers and page
numbers numerous ways. The simplest way is
to double click on the top or bottom of the page
and the header and footer area will appear.
Enter the text you wish to be displayed at the
top or bottom of every page.

Add Page Numbers


If you want a page number on each page, you can quickly add a page
number from the gallery.
1. On the Insert tab, in the Header & Footer group, click Page Number.
2. Click the page number location that you want.
3. In the gallery, scroll through the options, and then click the page
number format that you want.
4. To return to the body of your document, click
Close Header and Footer on the Design tab (under
Header & Footer Tools).
Add Header or Footer
1. On the Insert tab, in the Header & Footer group, click Header or
Footer.
2. Click the header or footer that you want to add to your document and
your header or footer area will open.
3. Type text in the header or footer area.
4. To return to the body of your document, click Close Header and Footer on the Design tab (under
Header & Footer Tools).

Remove page numbers, headers, and footers


1. Click on the Header, Footer or Page Number Command.
2. A drop down menu will appear.
3. Click Remove at the bottom of the menu.

Bulleted or Numbered List


You can quickly add bullets or numbers to existing lines
of text, or Word can automatically create lists as you
type. By default, if you start a paragraph with an asterisk
or a number 1., Word recognizes that you are trying to
start a bulleted or numbered list. If you don't want your
text turned into a list, you can click the AutoCorrect
Options button that appears.
BulletsCommand
Numbering Command
Insert Bulleted or Numbered List
1. Click on the area where you would like your
list to appear or highlight the text you would
like to be in a list.

2. Go to the Home tab, in the Paragraph group,


click Bullets or Numbering.
3. A bullet(s) or number(s) will be inserted.

Select Bullets or Numbering Style


1. Select the items that you want to add bullets
or numbering to.
2. On the Home tab, in the Paragraph group,
click the arrow next to the Bullets or
Numbering command.
3. Select the bullet or number format you would like to be inserted.

Move a List Left or Right


If you do not like the location of your bullets or numbers you can easily
move them to a preferred location.
1. Click a bullet or number in the list to highlight the list.
2. Drag the list to a new location. The entire list moves as you drag.
The numbering levels do not change.
Document Ruler
You can use the horizontal and vertical rulers in Word to align text, graphics, tables,
and other elements in your document. To view the horizontal ruler across the top of
your Word document and the vertical ruler along the left edge of your document, you
must be in Print Layout view.
1. To show or hide the horizontal and vertical rulers, click View Ruler at the top of the
vertical scroll bar.

Tab Stops
Creating tab stops can be helpful when creating a large number of documents such as flyers, table of
contents or even when creating a resume. They help you to display and line up information correctly.
Setting Manual Tab Stops

1. Click the tab selector at the left end of the ruler until it displays the type of tab that you want.
2. Then click in the ruler at the top of your page, where you want to set the tab stop.

The different types of tab stops found on the ruler are:


A Left Tab stop sets the start position of text that will then run to the right as you type.
A Center Tab stop sets the position of the middle of the text. The text centers on this position as you
type.
A Right Tab stop sets the right end of the text. As you type, the text moves to the left.
A Decimal Tab stop aligns numbers around a decimal point. Independent of the number of digits, the
decimal point will be in the same position. (You can align numbers around a decimal character only)
A Bar Tab stop doesn't position text. It inserts a vertical bar at the tab position.
NOTE: You can drag existing tab stops left or right along the ruler to a different position. Just Click and
hold on the tab stop on the ruler then drag it to where ever you would like it to be.

Setting Detailed Tab Stops


If you want your tab stops at precise positions that you can't
get by clicking the ruler, or if you want to insert a specific
character (leader) before the tab, you can use the Tabs
dialog box.
1. Click the Home tab, click the Paragraph Dialog Box
Launcher
2. A Paragraph box will appear, click on the Tabs button at the bottom left of the dialog box.
3. A Tabs dialog box will appear.
4. Under Tab stop position area, type the location where you want
to set the tab stop. Hit enter.
5. Under Alignment, click the type of tab stop that you want. See
the table above for an explanation of the different types of tab
stops.
6. To add dots with your tab stop, or to add another type of leader,
click the option that you want under Leader.
7. Click Set.
8. Repeat steps 4-5 to add another tab stop, or click OK.
9. The Tabs dialog box will disappear and you should see your tabs
set on the document ruler.
Clear Tab Stops
You can clear tab stops in a variety of ways, the simplest is going to the ruler, click and hold on the tab
stop and drag in down towards the document. The tab stop will disappear. To quickly clear multiple tab
stops and start fresh:
1. Click the Home tab, click the Paragraph Dialog Box Launcher
2. A Paragraph box will appear, click on the Tabs button at the bottom left of the dialog box.
3. A Tabs dialog box will appear.
4. In the list under Tab stop position, click the tab stop position that you want to clear, and then click
Clear. To remove the spacing from all manual tab stops, click Clear All.
5. Click OK.

Conclusion
.....................................................................................................................................................
………………………………………………………………………………………………….
…………………………………………………………………………………………….........
………………………………………………………………………………………………….
Lab 5
Objective: Working with Graphics, inserting, resizing, cropping & deleting of shapes, columns, Smart art
graphics, Tables and commands about tables

Apparatus: Personal Computer, Microsoft Office Word


Theory:

Working with Graphics


Inserting Shapes
You can add one shape to your file or combine multiple shapes to
make a drawing or a more complex shape. Available shapes include
lines, basic geometric shapes, arrows, equation shapes, flowchart
shapes, stars, banners, and callouts. After you add one or more
shapes, you can add text, bullets, numbering, and Quick Styles to
them.
1. On the Insert tab, in the Illustrations group, click Shapes.
2. A drop down menu will appear, click the shape that you want.
3. Click anywhere in the document, and then drag to place the
shape.

Insert Text to Shapes


Once you have added a shape, you may want to add text inside the
shape. All you have to do is click on the inside of the shape and start
typing.
NOTE: The text that you add becomes part of the shape — if you
rotate or flip the shape, the text rotates or flips also.

Format Shapes
After you insert a shape a new tab called Drawing Tools Format will
appear every time you click on the shape.
1. Click the shape that you want to apply a new or different Quick
Style to.
2. Go to the Drawing Tools Format tab, in the Shape Styles group, click the style that you want to be
applied.

3. To see more Quick Styles, click the More button .


The Drawing Tools Format Tab also allows you to change the shape fill, outline, effects and select how
the text in your document is wrapped around the shape.
Delete Shapes
If you decide you no longer want the shape in your document then click on the shape and then press
DELETE.

Inserting Text Boxes


A text box is an object that lets you put and type text anywhere in your file.
1. On the Insert tab, in the Text group, click Text Box and a drop down menu will appear.
2. Click on a text box template or click Draw Text Box at the bottom of the drop down menu to draw
your own text box.
3. If you elect to draw your own text box you need to click in the document, and then drag to draw the
text box the size that you want.
4. To add text to a text box, click inside the text box, and then type or paste text.
To format text in the text box, select the text, and then use the formatting options in the Font
group on the Home tab.
To position the text box, click it, and then when the pointer becomes a , drag the text box to a
new location.
NOTE: If you have problems printing text boxes, make sure that the Print drawings created in
Word check box is selected. To do this, click the File tab, click Options, click Display, and then
under Printing Options, select the Print drawings created in Word check box.

Deleting Text Boxes


To remove a text box just click the border of the text box that you want to delete, and then press
DELETE. Make sure that the pointer is not inside the text box, but rather on the border of the text box. If
the pointer is not on the border, pressing DELETE will delete the text inside the text box and not the text
box.

WordArt
WordArt can be used to add special text effects to your document. For example, you can stretch a title,
skew text, make text fit a preset shape, or apply a gradient fill. This WordArt becomes an object that you
can move or position in your document to add decoration or emphasis. You can modify or add to the text
in an existing WordArt object whenever you want. To add WordArt to text in your document, complete
the following steps:
1. On the Insert tab, in the Text group, click
WordArt,
2. A Drop down menu will appear, click the WordArt
style that you want.
3. A Text Box will appear with the words” Enter your
text here”, Enter your text.

Insert Picture/Clip Art


Pictures and clip art can be inserted or copied into a document from many different sources, including
downloaded from a clip art Web site provider, copied from a Web page, or inserted from a folder where
you save pictures.
Insert Clip Art
1. On the Insert tab, in the Illustrations group, click Clip Art.
2. A Clip Art task pane will appear on the right of your screen, in the Search for box, type a word or
phrase that describes the clip art that you want.
3. Click Go.
4. In the list of results, double click on the clip art to insert it into your document.

Insert Picture from Web


1. Open the document.
2. From the Web page, drag the picture that you want into the Word document.

Insert Picture from File


To insert a picture saved in your computer, insert it by following these steps.
1. Click where you want to insert the picture in your document.
2. On the Insert tab, in the Illustrations group, click Picture.
3. Locate the picture that you want to insert. For example, you might have a picture file located in My
Documents.
4. Double-click the picture that you want to insert and it will appear in your document.
NOTE: To resize a picture, select the picture you've inserted in the document. To increase or decrease
the size in one or more directions, drag a sizing handle away from or toward the center, while you do one
of the following:

Sizing Graphics
You can easily resize pictures, text boxes, shapes, and WordArt in your file. You can also crop pictures
or return them to their original size.
Manually Resize Graphics
1. Click the pictureshape, text box or WordArtthat you want to resize.
2. Small circles or squares, also known as sizing handles, will appear at the
corners and sides of a selected object.
3. Click and hold on a sizing handle away from or toward the center to increase or decrease the size of
the picture.

Cropping a Picture
Cropping reduces the size of a pictureby removing vertical or horizontal edges. Cropping is often used to
hide or trim a part of a picture, either for emphasis or to remove unwanted portions.
1. Click on the picture that you want to crop.
2. Go to Picture Tools, on the Format tab, in the Size group, click Crop.
3. Black dotted lines will appear around your picture. Then drag the center

cropping handle on that side inward.


4. As you drag the cropping handle you will notice the
area of your graphic you want removed will become
gray.
5. Once you have cropped out everything you want,
click outside of the graphic for the gray area you want removed to disappear.
Uncrop a Picture
You can always restore a resized or a cropped picture to its original appearance.
1. Click on your picture
2. Go to Picture Tools, on the Format tab, in the Size group, click Crop.
3. Black dotted lines will appear around your picture. Drag the black lines away from the center of the
picture and the original picture will appear.

Advanced Formatting Techniques


Create Columns
Columns can be used in documents such as brochures, newsletters or to save
space when creating lists.

Add columns before entering text:


1. Go to the Page Layout tab, in the Page Setup group, click Columns.
2. Click the layout that you want. Your document will be formatted in columns.
NOTE: To add a vertical line between the columns, click Columns again, click
More Columns, and then select the Line between check box. You can also
adjust the column width and spacing.

Add columns to part of a document


To do that highlight the text you want formatted in columns, or place your cursor
where you want columns to begin.
1. On the Page Layout tab, in the Page Setup group, click Columns.
2. Click More Columns.
3. Click the number of columns that you want.
4. In the Apply to list, click Selected text or This point forward.
NOTE: To change the layout again further on in your document, select text or click where you want to
change the layout, and then follow the same steps. For example, you can change from one column to a
two-column layout, and then you can change back to the single-column layout on a later page.

SmartArt Graphic
A SmartArt graphic is a visual representation of your information that you can quickly and easily create,
choosing from among many different layouts, to effectively communicate your message or ideas. You
can create SmartArt graphics in Excel,
Outlook, PowerPoint, and Word.

SmartArt graphics enables you to create


designer-quality illustrations with only a
few clicks of your mouse. When you
create a SmartArt graphic, you are
prompted to choose a type of SmartArt
graphic, such as Process, Hierarchy,
Cycle, or Relationship. Each type of
SmartArt graphics contains several
different layouts. After you choose a
layout, it is easy to switch the layout or
type of a SmartArt graphic. Most of your text and other content, colors, styles, effects, and text formatting
are automatically carried over to the new layout.
When you select a layout, placeholder text (such as [Text]) is displayed, so that you can see how your
SmartArt graphic looks, nor is it displayed during a slide show. However, the shapes are always
displayed and printed, unless you delete them. You can replace the placeholder text with your own
content.

Create a SmartArt Graphic


1. On the Insert tab, in the Illustrations group, click SmartArt.
2. In the Choose a SmartArt Graphic dialog box, click the type and layout that
you want.
3. Enter your text by doing one of the following:
Click [Text] in the Text pane, and then type your text.
Copy text from another location, click [Text] in the Text pane, and then paste your text.

Add or Delete Shapes in SmartArt Graphic


1. Click the SmartArt graphic that you want to add another shape to.
2. Click the existing shape that is located closest to where you want to add the new shape.
3. Under SmartArt Tools, on the Design tab, in the Create Graphic group, click the arrow under Add
Shape.
4. Do one of the following:
To insert a shape after the selected shape, click Add
Shape After.
To insert a shape before the selected shape, click Add
Shape Before.
NOTE: To delete a shape from your SmartArt graphic, click the shape you want to delete, and
then press DELETE. To delete your entire SmartArt graphic, click the border of your SmartArt
graphic, and then press DELETE.

Format SmartArt Graphic


You can apply color variations to the shapes in your SmartArt
graphic.
1. Click your SmartArt graphic.
2. Under SmartArt Tools, on the Design tab, in the
SmartArt Styles group,
3. Select the SmartArt Style you wish to apply to add line
styles, bevels or 3-D effects.
4. In the SmartArt Styles group you can also click Change Colors to further modify your SmartArt
graphic.
NOTE: If you don't see the SmartArt Tools or Design tabs, make sure that you've selected a SmartArt
graphic. You may have to double-click the SmartArt graphic to open the Design tab.
5. Click the color variation that you want.

Tables
Using tables in Word can provide you with additional elements to any document. Tables can be used to
create lists or format text in an organized fashion.

Inserting a Table
1. Click where you want to insert a table.
2. On the Insert tab, in the Tables group, click Table
3. A drop down box will appear; click and hold your mouse then drag to
select the number of rows and columns that you want inserted into
your document. You will see your table appearing in your document
as you drag on the grid.
4. Once you have highlighted the rows and columns you would like let
go of your mouse and the table will be in your document

Add Row/Column to Table


1. Click on the table.
2. Under Table Tools, go to the Layout tab
3. Click on the Insert Above or Insert Below to add a row, Click on
Insert Left or Insert Right to insert a column.

4. Click on Delete to remove a column, row or cell.

Delete a Table
1. Rest the pointer on the table until the table move handle appears, and then click the table move
handle.
2. Press BACKSPACE on your keyboard.

Delete Table Contents.


You can delete the contents of a cell, a row, a column, or the whole table. When you delete the contents
of a table, the table's rows and columns remain in your document.
1. Select the contents that you want to clear by following the table below:
TO SELECT DO THIS
The entire table In Print Layout view, rest the pointer over the table until the table move handle
appears, and then click the table move handle.
A row or rows
Click to the left of the row.
A column or
columns
Click the column's top gridline or border.
A cell
Click the left edge of the cell.
2. Press DELETE.
Finalizing a Document
Using the "Spell Check" Feature
As you type your document, red wavy lines will appear under any word that is spelled incorrectly. The
fastest way to fix spelling errors is to:
1. Put your cursor over the misspelled word and right click.
2. A drop down box will appear with correct spellings of the
word.
3. Highlight and left click the word you want to replace the
incorrect word with.
To complete a more comprehensive Spelling and Grammar check, you can use the Spelling and
Grammar feature.
1. Click on the Review tab
2. Click on the Spelling & Grammar command (a
blue check mark with ABC above it).
3. A Spelling and Grammar box will appear.
4. You can correct any Spelling or Grammar issue
within the box.

Print Preview
Print Preview automatically displays when you click
on the Print tab. Whenever you make a change to
a print-related setting, the preview is automatically updated.
1. Click the File tab, and then click Print. To go back to your document, click the File tab.
2. A preview of your document automatically appears. To view each page, click the arrows below the
preview.

Print
The Print tab is the place to go to make sure you are printing what you want.

Click the File tab.


Click the Print command to print a
document.
Click the Print button to print
your document.
This dropdown shows the
currently selected printer. Clicking the
dropdown will display other available
printers.
These dropdown menus show
currently selected Settings. Rather
than just showing you the name of a
feature, these dropdown menus show
you what the status of a feature is and
describes it. This can help you figure
out if you want to change the setting
from what you have.

TIP: To go back to your document


and make changes before you print it,
click the File tab.
2.
Save a document
To save a document in the format used by Word 2010 and Word 2007, do the following:
1. Click the File tab.
2. Click Save As.
3. In the File name box, enter a name for your document.
4. Click Save.
To save a document so that it is compatible with Word 2003 or earlier, do the following:
1. Click the File tab.
2. Click Save As.
3. In the Save as type list, click Word 97-2003 Document. This changes the file format to .doc.
4. In the File name box, type a name for the document.
5. Click Save.

Help
If you need additional assistance when completing your document you can use the help feature.
1. Click on the blue circle with the white question mark command
2. A Help box will appear.
3. Click in the Search Help textbox and type what you need help with
4. Click the magnifying glass next to the text box and the possible solutions will appear.

Conclusion
Lab 6
Objective: Overview of excel, creating work books & sheets, Selecting cell & ranges, Modifying Spreadsheets
Automatically Fill Data, Cell borders & style and using basic formulas in excel.

Apparatus: Personal Computer, Microsoft Excel


Theory:

Microsoft Excel’s Working Environment

Excel is a spreadsheet program in the Microsoft Office system. You can use Excel to create and format
workbooks (a collection of spreadsheets) in order to analyze data and make more informed business
decisions. Specifically, you can use Excel to track data, build models for analyzing data, write formulas to
perform calculations on that data, pivot the data in numerous ways, and present data in a variety of
professional looking charts.

Getting Started:
Opening Microsoft Excel:

You may have a shortcut to Excel on your desktop, if so double click the icon and Excel will
open. If not follow the steps below:
1. Click on the Start button
2. Highlight Programs
3. Highlight Microsoft Office
4. Click on Microsoft Excel 2010

A window like the following will appear


Create a New Workbook
1. Click the File tab and then click New.
2. Under Available Templates, double click Blank Workbook or
Click Create.

Enter Data in Worksheet


1. Click the cell where you want to enter data.
2. Type the data in the cell.
3. Press enter or tab to move to the next cell.

Select Cells and Ranges

In order to complete more advanced processes in Excel you need to be able to highlight or select cells, rows
and columns. There are a variety of ways to do this, see the table below to understand the options.
Modifying Spreadsheets
In order to create an understandable and professional document you will need to make adjustments to the
cells, rows, columns and text. Use the following processes to assist when creating a spreadsheet.

Cut, Copy, and Paste Data


You can use the Cut, Copy, and Paste commands in Microsoft Office Excel to move or copy entire cells or
their contents. NOTE: Excel displays an animated moving border around cells that have been cut or copied.
To cancel a moving border, press ESC
Move/Copy Cells

When you move or copy a cell, Excel moves or copies the entire cell, including formulas and their resulting
values, cell formats, and comments.
1 Select the cells that you want to move or copy.
2 On the Home tab, in the Clipboard group, do one of the
following:
 To move cells, click Cut.
 To copy cells, click Copy.
3 Click in the center of the cell you would like to Paste the
information.
4 On the Home tab, in the Clipboard group, click Paste.

Set Column/Row Width/Height with Mouse

To change the width of one column/row


1. Place you cursor on the line between two rows or columns.
2. A symbol that looks like a lower case t with arrows on the horizontal line will appear
3. Drag the boundary on the right side of the column/row heading until the column/row is the width
that you want.

To change the width of multiple columns/rows


1. Select the columns/rows that you want to change
2. Drag a boundary to the right of a selected column/row heading.
3. All selected columns/rows will become a different size.

To change the width of columns/rows to fit the contents in the cells


1. Select the column(s) or row(s) that you want to change
2. Double-click the boundary to the right of a selected column/row
heading.
3. The Column/Row will automatically be size to the length/height of
the longest/tallest text.

Merge and Center Cells

1. Select two or more adjacent cells that you want to merge.


2. On the Home tab, in the Alignment group, click Merge and Center.
3. The cells will be merged in a row or column, and the cell contents will be centered in the merged
cell
Merge Cells
To merge cells only, click the arrow next to Merge and Center, and then click Merge Across or
Merge Cells.

Split Cells
 Select the merged cell you want to split
 To split the merged cell, click Merge and Center. The cells will split and the contents of the merged
cell will appear in the upper-left cell of the range of split cells.
Automatically Fill Data

To quickly fill in several types of data series, you can select cells and drag the fill handle.
To use the fill handle, you select the cells that you want to use as a basis for filling additional cells, and then
drag the fill handle across or down the cells that you want to fill.
1. Select the cell that contains the formula that you want to be brought to other cells.
2. Move your curser to the small black square in the lower-right corner of a selected cell also now as the fill
handle. Your pointer will change to a small black cross.
3. Click and hold your mouse then drag the fill handle across the cells, horizontally to the right or vertically
down, that you want to fill.
4. The cells you want filled will have a gray looking border around them. Once you fill all of the cells let go of
your mouse and your cells will be populated.

Formatting Spreadsheet
To further enhance the spread sheet we format a number of elements like text, numbers, coloring and
table styles.

Wrap Text:
You can display multiple lines of text inside a cell by wrapping the text. Wrapping text in a cell does not
affect other cells

1. Click the cell in which you want to wrap the text.


2. On the Home tab, in the Alignment group, click Wrap
Text.
3. The text in your cell will be wrapped
Cell Borders:
By using predefined border styles, you can quickly add a
border around cells or ranges of cells. If predefined cell borders do
not meet your needs, you can create a custom border.

Apply Cell Borders:

1. On a worksheet, select the cell or range of cells that you


want to add a border to, change the border style on, or
remove a border from.
2. Go to the Home tab, in the Font group
3. Click the arrow next to Borders
4. Click on the border style you would like
5. The border will be applied to the cell or cell range

NOTE: To apply a custom border style, click More Borders.


In the Format Cells dialog box, on the Border tab, under Line
and Color, click the line style and color that you want.

Remove Cell Borders:

1. Go to the Home tab, in the Font group


2. Click the arrow next to Borders
3. Click No Border.

Cell Styles

You can create a cell style that


includes a custom border, colors and
accounting formatting.
1. On the Home tab, in the Styles
group, click Cell Styles.

2. Select the different cell style option


you would like applied to your
spreadsheet
Cell and Text Coloring

You can also modify a variety of cell and text colors manually.

Cell Fill

1. Select the cells that you want to apply or remove a fill color
from.
2. Go to the Home tab, in the Font group and select one of the
following options:
a. To fill cells with a solid color, click the arrow next to Fill
Color, and then under Theme Colors or Standard
Colors, click the color that you want.
b. To fill cells with a custom color, click the arrow next to
Fill Color, click More Colors, and then in the Colors
dialog box select the color that you want.
c. To apply the most recently selected color, click Fill Color
.
Remove Cell Fill

1. Select the cells that contain a fill color or fill pattern.


2. On the Home tab, in the Font group, click the arrow next to
Fill Color, and then click No Fill.

Text Color

1. Select the cell, range of cells, text, or characters that you want to format
with a different text color.
2. On the Home tab, in the Font group and select one of the following
options:
a. To apply the most recently selected text color, click Font Color
b. To change the text color, click the arrow next to Font Color, and then under Theme
Colors or Standard Colors, click the color that you want to use.

Customize Worksheet Tab

1. On the Sheet tab bar, right-click the sheet tab that you want to
customize
2. Click Rename to rename the sheet or Tab Color to select a tab
color.
3. Type in the name or select a color you would like for your
spreadsheet.
4. The information will be added to the tab at the bottom of the
spreadsheet.
Task 1

1. Enter the data “Sunday” into cell A1 and “Monday” into cell B1.
2. Type in “17/08” into cell E8.
3. Type in “2” into cell I8 and “4” into cell I9.

Auto-complete

Your worksheet should now look like this:

Notice how Excel automatically detected that 17/08 was a date and converted it to 17-Aug. We will discuss
formatting data later on in this lab. Now, we want to select both cells A1 and B1 together. To do this, click
A1 and without releasing the mouse button, move the mouse over cell B1. Now there should be a
rectangle around both cells as shown below
To get excel to auto-complete this row, we now position the mouse cursor at the bottom-left corner of the
rectangle. Make sure the cursor has changed into a + sign. Now hold down the cursor and drag it to the
left till I1.

Lab Task 2:
1. Auto-complete cells I8 and I9 all the
way to I14.
2. Auto-complete cell E8 all the way to
E12.

Basic Calculations:

When working on a spreadsheet, you will


almost definitely need to perform some
calculations on the data you have. The
first thing you need to remember about
Excel calculations is that formulas
always start with an = sign. Let us begin
with a very simple calculation. Type
“=3+5”
Into cell A5 as shown below. Press Enter. Excel automatically replaces the formula with the result of the
equation.

Now let us calculate the sum of the numbers in I8 and I9. In cell J10, type “=I8+I9”. One

other option is to type in “=”, then select cell I8. After that, type in “+” and then select I9.

Pressing Enter will


give you the result
of the calculation.
Double clicking on
the cell with the
formula allows you
to edit the formula.
Excel has built-in
functions that make
your life easier. One
of them is the SUM
function. In cell J11,
type “=sum(“. Now
select both cells I8
I9. Pressing Enter gives you the same result as the plus operation we did in cell J10. Try changing the
value in cell I8 and notice how the change is reflected in both formulas.

Lab Task 3:
1. Open Sheet 2 in your workbook.
2. In cells A1 and A2, type 1000 and 1500 respectively.
3. Use auto-complete to fill in cells A3 to A8.
4. Calculate the following values for cells A1 to A8 using built-in Excel functions:
a) Sum
b) Maximum
c) Minimum
d) Average
e) Median
f) Standard deviation
5. Enter the number 5000 into cell A9 and modify all the above formulas to include it.
6. Calculate the sum of the Maximum and Minimum, and then divide this number by the standard
deviation.

Conclusion
Lab 7
Objective: Overview of Power point, adding slides, formatting slides, applying clip art, translation of slides
animation and inserting tables and charts in slides
Apparatus: Personal Computer, Microsoft Visio
Theory:

PowerPoint is a system in the Microsoft Office Suite that enables you to present information in office
meetings, lectures and seminars to create maximum impact in a minimal amount of time. PowerPoint
presentations can amplify your message, accelerate the information being absorbed and assist with
comprehension enabling faster decision making.

New PowerPoint Document


When you first open PowerPoint you will see what's called the Normal view.
1. The slide pane is the big area in the middle. This is the area you will work in to create your
slides.
2. On each slide, you will see various
boxes with the dotted borders which
are called placeholders. This is
where you type your text.
Placeholders can be customized to
different sizes and can contain
pictures, charts, and other non- text
items.
3. On the left of the screen are
thumbnail versions of the slides in
your presentation; the slide you're
working will be highlighted.
4. The bottom area is the notes pane,
this is where you type speaker notes
that you can refer to when you
present. You can also print speaker
notes to use when presenting a slide
show.

Adding Additional Slides

1 Clicking on the top portion of


the New Slide command, on the
Home tab is the easiest method
because a new slide will be added
immediately. PowerPoint will
automatically insert a Title and
Content slide when using this
method of adding slides.
Formatting Text
Many of your slides will require you to enter text in the placeholder boxes.
1 When typing text
PowerPoint will automatically
place the text into bulleted
lists to make minor points
under major points.
PowerPoint will also
automatically text fit the text
reducing font size and line
spacing to fit everything into
the placeholder boxes.
2 To change the text font,
color and size use commands
in the Font group.
3 To change paragraph
formatting such as bullet type, text indentation, and line spacing use the commands in the
Paragraph group.

Adding a Design Theme


A theme includes a background design, color scheme, font types, font sizes, and placeholder
positions in one package. Every new presentation starts out with the default theme, called
Office theme, which is a white background and black text. However you can change the theme
to a wide variety of options. To find and apply a theme, click the Design tab on the Ribbon.
1 The Themes group
provides thumbnails of
different design options.
2 To see additional themes,
click the More arrow button
on the right of the group.
3 When you point and
hover on any theme
thumbnail, a preview of the
theme will appear on the
slide. To apply the theme to
your slides, click on the
thumbnail design you like.

NOTE: A theme can be selected at any time during the creation of your slides however; themes
can alter the position of placeholders, so your text maybe automatically adjusted to properly fit
the placeholder of the theme causing unexpected formatting changes to your slides.
Inserting Clip Art
If you would like to add an additional dimension to a PowerPoint slide you can add Clip Art to
your slides. Clip Art includes pictures, sounds and videos. There are two ways to initiate
inserting Clip Art depending on where you would like the graphic to be located.

1 The first method is to go to the Insert Ribbon and click on the Clip Art command. You can
also click on the Audio or Video commands and opt to pick from the Clip Art gallery. The
second method is to click on the Clip Art icon in a placeholder.
2 The Clip Art task pane will then open on the right. Type a keyword in the Search for box
that suggests the type of clips you may want. Use the Results should be drop down to select
the media type to search in then click Go.
3 Clips that fit the keyword will appear in the box below. Click on the clip that you would like
on your slide and it will be automatically appear.

NOTE: When inserting a graphic using the icon in a placeholder causes the graphic to be
automatically sized and positioned within the placeholder preventing you from entering text in
the same placeholder. Inserting a graphic through the Insert Ribbon will insert the graphic on
the slide without removing the placeholder enabling you to enter text on the slide without having
to further modify your slide.
Slide Transitions
Slide transitions provide an animated effect to each slide when moving from one slide to the
next during a slide show. There are a variety of transitions that can be applied to each or all
slides including sounds.
1 4
6
5
2 3

1 The Transition to This Slide group provides thumbnails of various slide transition options.
To see all of the transitions options click on the up and down arrows or the More arrow to
the right of this group.
2 When you point and hover over any transition thumbnail, a preview of the theme will play.
To apply the transition to your slide, click on the thumbnail you like.
3 To apply the same transition to all of your slides click on the Apply To All command after
selecting the transition of your choice.
4 To apply a Sound, click on the sound drop down arrow. Then Click on the sound you would
like to chime during the slide transition. Click the Apply To All command to have the chime
occur during each transition.
5 The Advance Slide group, allows you to decide if a transition should appear when the
mouse is clicked or after a specified time. Click the On Mouse Click box for transitions to
occur only when forced. Click on the After box for the slide to transition at the time
specified such as 5 seconds or 1 minute.
6 Finally, when all transitions are applied you can preview the current slide by clicking on the
Preview command.

Slide Animations
Slide animations create animated effects to text and graphics during a slide show. There are a
variety of animations that can be applied to text or graphics in multiple ways from a single word
to all of the text on a slide.
4
1
5
2
3
1 The Animation group provides a variety of option to apply animations to text and graphics
within each slide.
To see all of the animation options click on the Up Row, Down Row and More arrows to
the right of the Animation group.
The Effect Options command
provides additional animation
options for each animation
command in the Animation
group.
The Add Animation command
provides a visual of all of the
animation options to animate
text and graphics upon
Entrance, Exit and as an
Emphasis. These commands
are the same as the commands
in the Animation group.
2 When you point and hover over
any animation command, it will be
highlighted in a golden color and a
preview of the animation will
appear. To apply an animation,
highlight text or select a graphic
that you would like the animation to be used on, then click on the command, the selected
command will remain highlighted in a golden color.
3 The Timing group allows you to modify the sequence and timing of the animations selected.
You can decide if an animation should appear when the mouse is clicked or after a specified
time. You can also decide if text should be animated together or separate as well as
reordering the animations. Use the Start drop down arrow to opt for animations to occur
only when clicked or with other text. Click on the Duration box for the text or graphic to
animate at a specified time.
4 The Animation Pane displays all of the animations you
have applied to each slide. It also enables you to modify
each animation similar to the Timing group and play the
animations applied to the slide.
5 Finally, when all animations are applied you can preview
the current slide by clicking on the Preview command.
Starting a Slide Show
The best way to view your slides as a show, whether you are previewing your documents or
presenting to an audience, go to the Slide Show tab on the Ribbon.

1 To view your slide show go to the Start Slide Show group. To start on the first slide click
the From Beginning command. To start on the current slide click the From Current Slide
command.
2 Your computer screen will disappear and a slide show will fill
your computer screen.
3 To move from slide to slide you can use the Slide Show toolbar,
at the bottom left of the screen.
Navigational arrows will appear when you
position your cursor in that area. You can
also move from slide to slide by clicking the
mouse button or using the right and left
arrows on the keyboard.
4 To end your slide show press the ESC
button on your keyboard. This will return you to your screen as you left.

NOTE: Another way to quickly preview a slide is to click on the Slide Show button in the
lower right part of the PowerPoint window. The slide show will begin from the slide selected on
the Slides tab.

Printing Slides
One new feature in PowerPoint 2010 is the File
tab. This tab incorporates many of the features in
the 2003 and 2007 versions of PowerPoint but
makes them much more user friendly.

To print your slides click on the File tab, then


the Print command.
o When you select the Print command, you
will notice all of your printing options
including a preview of your document are
right at your fingertips.
Select your Print options and click on the
Print command.

6
PowerPoint provides a variety of Print options such as automatically previewing your document
and selecting specific formats in which your slides will print.

Print Preview
When you select the Print command under the File tab, your document will automatically
appear in as a preview of what will print. If you change your print options, the preview will
change accordingly. To view each page click on the left or right arrows next to the page number
in the box and the bottom middle section of your screen.

Print Layout
You are able to select how you would like your slides to be
printed by selecting the drop down arrow next to the Fill
Page Slides command.
Then, click on the format would like your slides to print
in. The different options are:
o Full Page Slides – print out with each slide on a
full page
o Handouts - print out with up nine slides per page
o Notes Page - print out of one slide per page
including any notes you may have added in the
Notes Pane while creating your presentation
o Outline View - print out of your text from all of your slides in an outline format.
Once you select your printing format, a preview of your slides will appear. When you're
ready to print, click the Print command.
NOTE: If you would like to print slides that also include lines for audience notes you need to
select Handouts (3 Slides Per Page).

Slide Color
Another helpful printing option allows you to print your slides in
different hues. This can reduce the amount of expensive color
ink when printing PowerPoint slides.
Click on the Color command.
Select the color you would like your slides to appear.
Preview the slides and then click on the Print command.

Saving Slides
To Save your slides, go to the File tab and select Save or Save As.
Save As – use when you save any document for the first time, it will
automatically asked you where to save the document on your
computer and to change the name of the document.
Save – automatically saves the document to a default location and
name or the location and name you selected when first using the Save As feature.
Additional Features
The information above provides you with a basic understanding of how to create a PowerPoint
presentation. However, there are many additional features PowerPoint offers to make your
presentation incredible. Many of these features are also used in Microsoft Word and Excel as
well as other Microsoft programs.

Insert Shapes
Shapes can be used in PowerPoint as a graphic to enhance the
presentation or to insert text into to add visual appeal to a slide.
1 Go to the Insert Tab
2 Click on the Shapes command
3 A large selection of shapes will appear in a drop down menu
4 Double click on the shape you want to insert
5 The shape will appear on the slide
6 Move the shape to any area of the slide by clicking on the edge
of the shape and dragging it. Expand or shrink the shape by
clicking on the circles surrounding the shape and drag.
NOTE: Inserting a Text Box is done in the same manner except
when it is inserted a curser will appear inside the box so you can
enter text.
Inserting Pictures
Pictures are another way to include graphics into a PowerPoint presentation. Many people like
using this feature to incorporate pictures from their personal collection to distinguish their
presentation.
1 Go to the Insert Tab
2 Click on the Picture command
3 A Insert Picture box will appear
4 Select the picture to insert using the folders
on the left of the Insert Picture box.
5 Click Open
6 The picture will appear on the slide
7 Move the picture to any area of the slide by
clicking on the edge of the picture dragging
it. Expand or shrink the picture by clicking
on the circles surrounding the picture and
drag.

Modifying Graphics
Any graphical element inserted into the PowerPoint can be modified by using the Specialized
Tabs that appear when working with graphics. For example the
Picture Tools Format Tab allows you to change the shape, effects
and colors of the picture you inserted.
Inserting WordArt
WordArt can be used to accentuate important words in a presentation such as the title.
1 Go to the Insert Tab
2 Click on the WordArt command
3 A drop down menu of text options will appear
4 Click on the text design you prefer and a text box will appear on
your slide.
5 Click in the text box to modify the text
6 Move the WordArt to any area of the slide by clicking on the edge
of the text and dragging it. Expand or shrink the WordArt by
clicking on the circles surrounding the text and drag.

Inserting SmartArt
SmartArt can be used similar to a graphic by inserting a SmartArt design and entering text in
specified areas. This can be especially
helpful when illustrating hierarchy
structures and processes.
1 to the Insert Tab
2 Click on the SmartArt command
3 A Choose a SmartArt Graphic box
will appear
4 Click on the graphic you prefer and it
will appear on your slide.
5 Click in the areas of the SmartArt
graphic to enter text in the graphic.

Inserting Tables or Charts


Tables and Charts can be used to express data in a
presentation. First, go to the Insert Tab:
To insert a Chart:
1 Click on the Chart command
2 An Insert Chart box will appear
3 Click on the chart you prefer.
4 An Excel worksheet will open, enter the data in the
Excel Document that you want displayed on the chart
To insert a Table:
1 Click on the Table command
2 Highlight the number of cells you want in your table
3 Click for the table to appear on your slide.
4 Click on each cell to enter the data you need
displayed
Inserting Hyperlinks
Hyperlinks are used to allow a presenter a way to access a website during the presentation by
pressing a link inserted into the slide.
1 Go to the Insert Tab
2 Click or highlight the test you want
to become the hyperlink
3 Click on the Hyperlink command
4 A Insert Hyperlink box will
appear
5 Click on the Existing File or Web
Page command on the left of the
Insert Hyperlink box
6 Verify the information in the Text
to Display box is accurate
7 Enter the web address in the Address box, then click OK
8 The hyperlink will appear in the text on your slide by changing the color of the text to blue
and underlined
9 To use the link you must be viewing the slide show.

Creating a Photo Album


A PowerPoint photo album is a presentation that you can create to display your personal or
business photographs using the same fun features as a PowerPoint presentation.
To create a photo album:
1 Click on the Insert tab 2
2 Click on the Photo Album
command
4
3 Click on the New Photo Album option
4 Click on the File/Disk command to select pictures you
have saved on your computer that you want to
incorporate into your Photo Album. Once you select a
picture it will be listed in the Pictures in album box.
5 Click the Create command and your photo album slide 5
show will be created.
To modify your photo album:
1 Click on the Edit Photo Album
command.
1 2 Use the Album Layout group to
select the Picture layout, Frame
shape and add a Theme.
3 Once all changes are complete,
click on the Update command
2 and the changes will be applied
to your photo album.
3
Conclusion
Lab 8
Objective: To learn about basic functions and applications of Hub, Switch, Bridge, Routers, Gateway and
Network cards.

Apparatus: Hub, Switch, Bridge, Routers, Gateway and Network cards.


Theory:
Hub
At the bottom of the networking food chain, so to speak, are hubs. Hubs are used in networks that use twisted-
pair cabling to connect devices. Hubs also can be joined to create larger networks. Hubs are simple devices that
direct data packets to all devices connected to the hub, regardless of whether the data package is destined for the
device. This makes them inefficient devices and can create a performance bottleneck on busy networks.

Switches
Like hubs, switches are the connectivity points of an Ethernet network. Devices connect to switches via twisted-
pair cabling, one cable for each device. The difference between hubs and switches is in how the devices deal with
the data they receive. Whereas a hub forwards the data it receives to all the ports on the device, a switch forwards
it to only the port that connects to the destination device. It does this by learning the MAC address of the devices
attached to it and then by matching the destination MAC address in the data it receives. Figure shows how a
switch works.
Bridges
Bridges are used to divide larger networks into smaller sections. Bridges accomplish this by sitting between two
physical network segments and managing the flow of data between the two. By looking at the MAC address of
the devices connected to each segment, bridges can elect to forward the data (if they believe that the destination
address is on another interface) or block it from crossing (if they can verify that it is on the interface from which
it came). Figure shows how a bridge can be used to segregate a network.

Routers
In a common configuration, routers are used to create larger networks by joining two network segments. A small
office, home office (SOHO) router is used to connect a user to the Internet. A SOHO router typically serves 1 to
10 users on the system. A router can be a dedicated hardware device or a computer system with more than one
network interface and the appropriate routing software. All modern network operating systems include the
functionality to act as a router. Routers normally create, add, or divide networks or network segments at the
network layer of the OSI reference model because they normally are IP-based devices.
Gateways
Any device that translates one data format into another is called a gateway. Some examples of gateways include
a router that translates data from one network protocol into another, a bridge that converts between two
networking systems, and a software application that converts between two dissimilar formats. The key point about
a gateway is that only the data format is translated, not the data itself. In many cases, the gateway functionality is
incorporated into another device.

Network Card
Network card is a necessary component of a computer without which a computer cannot be connected over a
network. It is also known as network adapter or Network Interface Card (NIC). Most branded computers have
network card pre-installed. Network cards are of two types: Internal and External Network Cards.

Internal Network Cards


Motherboard has a slot for internal network card where it is to be inserted. Internal network cards are of two types
in which first type uses Peripheral Component Interconnect (PCI) connection while the second type uses Industry
Standard Architecture (ISA). Network cables are required to provide network access.
External Network Cards
External network cards come in two flavours: Wireless and USB based. Wireless network card need to be inserted
into the motherboard but no network cable is required to connect to network.

Wireless Access Points


Wireless access points (APs) are a transmitter and receiver (transceiver) device used to create a wireless LAN
(WLAN). APs typically are a separate network device with a built-in antenna, transmitter, and adapter. APs use
the wireless infrastructure network mode to provide a connection point between WLANs and a wired Ethernet
LAN. APs also typically have several ports, giving you a way to expand the network to support additional clients.
Depending on the size of the network, one or more APs might be required. Additional APs are used to allow
access to more wireless clients and to expand the range of the wireless network. Each AP is limited by a
transmission range the distance a client can be from an AP and still get a usable signal. The actual distance
depends on the wireless standard being used and the obstructions and environmental conditions between the client
and the AP.

Modems
A modem, short for modulator/demodulator, is a device that converts the digital signals generated by a computer
into analog signals that can travel over conventional phone lines. The modem at the receiving end converts the
signal back into a format that the computer can understand. Modems can be used as a means to connect to an ISP
or as a mechanism for dialing up a LAN. Modems can be internal add-in expansion cards or integrated with the
motherboard, external devices that connect to a system’s serial or USB port, PCMCIA cards designed for use in
laptops, or proprietary devices designed for use on other devices, such as portables and handhelds.
Repeaters
As mentioned in Chapter 2, data signals weaken as they travel down a particular medium. This is known as
attenuation. To increase the distance a signal can travel, you can use repeaters. Repeaters increase the cable’s
usable length and are commonly used with coaxial network configurations. Because coaxial networks have fallen
out of favor, and because the functionality of repeaters has been built in to other devices, such as hubs and
switches, repeaters are rarely used as an independent device.

Conclusion
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
Lab 9
Objective: Overview of thinking and process mapping, visio interface, page setup, basic drawing
skills, adding & deleting shapes and saving drawing

Apparatus: Personal Computer, Microsoft Visio


Theory
Introduction
Microsoft Visio 2010 helps users create professional-looking diagrams for understanding,
documenting, and analyzing information, data, systems, and processes. This Lab provides an
overview of the Visio 2010 user interface and includes step-by-step instructions on how to work
with shapes and text, connect and group shapes, and print the final diagram. It also includes a brief
introduction to systems thinking and process mapping, including how to select a process and the
procedure of process mapping.

Introduction to Systems Thinking and Process Mapping


Process mapping is a crucial tool for systems thinking. The participants in a process, the
information gathered and action taken, as well as how that information flows throughout the
system can be identified in process mapping.
Process Mapping Using Visio
While Microsoft Word and PowerPoint provide basic diagramming capabilities, Visio is a dedicated
drawing program that can help users easily create a broad range of drawings.

Figure – Example of a Process Map

Starting Visio

There are multiple ways to start Visio. You can start Visio 2010 from the Start menu (in
Windows 7), or by opening an existing Visio file.

To start Visio 2010 from the Start menu:

1. Click the Start button, click All Programs, click Microsoft Office, and then click
Microsoft Visio 2010.

Overview of the User Interface

When you start Visio, the program window opens and the Backstage view displays. The
Backstage view contains all the commands related to managing files and customizing the
program. It provides an easy way to create, open, save, print, share, and close files; find recently
used files; view and update file properties; set program options; get help; and exit the program

The New page of the Backstage view provides access to dozens of predesigned templates that you
can use to create diagra. The templates are organized into categories of related diagram types;
the number of templates available in each category varies (see Table 1 for a list of available
template categories). Once a category is selected, all the available templates in that category are
displayed.
Visio 2010 Backstage View
Template Categories in Visio

Category Purpose
Business To show business processes using auditing diagrams, brainstorming diagrams,
cause and effect diagrams, organization charts, etc.
Engineering To create basic electrical diagrams, circuits and logic diagrams, fluid power
diagrams, industrial control systems diagrams, part and assembly drawings,
etc.
Flowchart To create basic flowcharts, cross-functional flowcharts, work flow diagrams,
etc.
General To create basic diagrams and block diagrams.
Maps and To create two-dimensional or three-dimensional directional maps, floor plans,
Floor Plans home plans, office layouts, space plans, etc.
Network To create Active Directory diagrams, basic and detailed network diagrams, rack
diagrams, etc.
Schedule To track project details with calendars, timelines, Gantt charts, and PERT
charts.
Software and To create conceptual diagrams of websites, data flow diagrams, database
Database model diagrams, website maps, etc.
After selecting the desired template and clicking the Create button, Visio creates a new drawing
and opens it in the program window. The Visio 2010 program window is designed to help you
quickly find the tools that you need to complete a task.

Visio 2010 Program Window


Visio 2010 Program Window Elements

Element Description
Title bar Displays the name of the drawing and the program. The Minimize, Restore
Down/Maximize, and Close buttons at the right end of the Title bar are used to
control the program window.
Quick Access Contains frequently used commands that are independent of the tab displayed on
toolbar the Ribbon.
Ribbon Consists of a set of tabs, each of which contains groups of related commands.
The Home tab contains commands that are used most often; the other tabs
contain commands that are used for special purposes.
Shapes pane Contains one or more stencils, each represented by a title bar containing the
name of the stencil. Stencils hold collections of shapes. Click a stencil’s title bar
to see the shapes in that stencil.
Drawing window Displays all or part of the current drawing page. The page controls located at
the bottom of the drawing window can be used to navigate from one page to
another within the drawing.
Status bar Contains tools to help you move more efficiently within and between your
diagrams.
Using Page Setup
The Page Setup dialog box is used to customize printed drawings. It is helpful to customize the
printer paper size and the drawing page before starting the drawing in order to better arrange the
space. The Print Setup and Page Size tabs of the dialog box are explained in detail in the following
sections.

Using the Print Setup Tab

The Print Setup tab provides several settings that you can adjust, such as the printer paper size and
orientation. Gridlines can be chosen to print when measurements are important in the drawing. The
Print zoom section enables you to reduce or enlarge the printed size of the drawing.

To change the paper orientation and the printed size of a drawing:


1. Click the File tab on the Ribbon, and then click Open in the left pane.
2. In the Open dialog box, navigate to the folder that contains the sample data files, select
the print.vsd file, and then click the Open button.
3. On the Design tab of the Ribbon, click the dialog box launcher in the Page Setup
group. The Page Setup dialog box opens.
4. Click the Print Setup tab, if necess.
5. Under Printer paper, select the Landscape option.
6. Under Print zoom, click the Adjust to arrow and select 50% from the list.
7. Under Print, select the Gridlines check box.
8. Click the OK button.

Page Setup Dialog Box: Print Setup Tab

Using the Page Size Tab


The Page Size tab allows you to adjust the page size and set the page orientation to either portrait
or landscape for the drawing.
To change the page size and orientation:
1. On the Design tab of the Ribbon, click the dialog box launcher in the Page Setup
group. The Page Setup dialog box opens.
2. Click the Page Size.
3. Under Page size, select the Pre-defined size option.
4. Under Page orientation, select the Landscape option.
5. Click the OK button.

Page Setup Dialog Box: Page Size Tab

Using Basic Drawing Skills


Visio allows users to create a drawing in several ways, including using a wizard which provides
guidance for creating a drawing. The easiest way to create a drawing is to select a template from
one of the template categories.

Adding Shapes to Drawings

You can add a shape to a drawing by simply dragging the desired shape from the Shapes pane onto
the drawing page.

To add a shape to a drawing:

1. Click the File tab on the Ribbon, and then click New in the left pane. Thumbnails of the
recently used templates and template categories display in the center pane.
2. In the Template Categories section, click the General category. Thumbnails of all the
templates in the selected category display in the center pane.
3. In the center pane, click the Basic Diagram template. A description and larger preview
of the selected template appear in the right pane.
Backstage View Displaying Templates in the General Category

4. In the right pane, select the US Units option, and then click the Create button. The
drawing page displays.
5. In the Shapes pane, select the Basic Shapes (US units) stencil, if necessary.
6. Drag the Square shape from the stencil onto the drawing page.

Square Shape Added to the Draw ing Page

Saving New Drawings


When you save a drawing for the first time, the Save As dialog box opens, allowing you to
specify a file name and location. By default, Visio 2010 drawings are saved in the Drawing
format which has the .vsd file extension
To save a new drawing:
1. Click the Save button on the Quick Access toolbar. The Save As dialog box opens.
2. Select a location to save the file.
3. In the File name box, type a name for the file.
NOTE: File names cannot contain the following characters: forward slash (/), backslash (\), greater than
sign (>), less than sign (<), asterisk (*), question mark (?), quotation mark ("), pipe symbol (|), and colon
(:).
4. Click the Save button.
NOTE: After you save a drawing for the first time, you can save changes simply by clicking the
Save button on the Quick Access toolbar.

Adding and Deleting Pages


When a new drawing is created, Visio provides only one page. You can add or remove as many
pages as desired. When you add a page, it uses the attributes of the page currently displayed.

To add a page to the drawing:


1. Right-click the Page-1 tab at the bottom of the drawing window, and then click Insert.
The Page Setup dialog box opens.
2. On the Page Properties tab, next to Type, select the Foreground option.
3. In the Name box, type a new name or leave the default name.
4. Click the OK button.

Page Setup Dialog Box: Page Properties Tab

To delete a page from the drawing:


1. At the bottom of the drawing window, right-click the page tab of the page you want to delete,
and then click Delete.

Conclusion
Lab 10
Objective: To learn about selecting, moving, resizing, rotating & deleting Shapes, working with
text, connecting & grouping of shapes.

Apparatus: Personal Computer, Microsoft Visio


Theory:
Working with Shapes
Shapes are the building blocks of your diagram. Shapes are stored in stencils. To create drawings, you
can either use the shapes that Visio provides or create your own shapes.

Selecting Shapes

You can select a shape in a Visio drawing by clicking once on the shape. To select a filled shape,
click inside the shape; to select an unfilled shape, click the border of the shape. When you select a
shape, a blue selection box with handles appears around the shape. You can select multiple shapes by
holding down the Shift key while clicking additional shapes. To select all the shapes on the drawing
page, press the Ctrl+A key combination. When you select multiple shapes, a blue selection box with
handles appears around the shapes and magenta lines appear around the individual shapes.

Multiple Shapes Selected on the Draw ing Page

To select multiple shapes:


1. Open the shape.vsd file.
2. Click the Square shape at the bottom of the drawing page, and then hold down the
Shift key and click the Star shape at the top of the drawing page.
NOTE: To deselect one of the selected shapes, hold down the Shift key and click the shape that you want to
remove from the selection. To deselect all shapes, click in a blank area of the drawing page or press the Esc
key.
Moving Shapes
You can move a shape in a Visio drawing by dragging the shape to the desired position. To constrain
the movement of the shape to vertical or horizontal, hold down the Shift key while you drag the shape.
The arrow keys on the keyboard allow you to move a shape in small increments.

To move a shape:
1. Drag the Triangle shape to a position approximately one inch above the Square
shape .
2. Hold down the Shift key and drag the Triangle shape horizontally one inch to the left.
3. Press the Down Arrow and Right Arrow keys as necessary to position the Triangle
shape on top of the Square shape.
4. Click in a blank area of the drawing page to deselect the shape.

Resizing Shapes
You can use the selection handles on a selected shape to resize it. Dragging the selection
handles in the center of each edge alter the width or height of the shape. Dragging the selection
handles on the corners adjust the width and height proportionally.

NOTE: The width and height of a selected shape appear on the Status bar at the bottom of the program
window. This information is useful if you need to resize a shape to a specific size.

To resize a shape:
1. Click the Star shape to select it.
2. Drag one of the corner handles until the Star shape is approximately 1/2 inch high by
1/2 inch wide.
3. Click in a blank area of the drawing page to deselect the shape.

Rotating Shapes
You can use the rotation handle on a selected shape to rotate it. When you point to the rotation
handle, the mouse pointer changes to a curved arrow .

NOTE: The rotation angle of a selected shape appears on the Status bar at the bottom of the program window.
This information is useful if you need to rotate several shapes to the same angle.

To rotate a shape:
1. Click the Triangle shape to select it.
2. Drag the rotation handle to the left until a 45 degree angle is reached.
3. Click in a blank area of the drawing page to deselect the shape.

Copying and Pasting Shapes


You can use the Copy and Paste features of Visio to duplicate shapes. The Copy feature is similar to
the Cut feature, except that the Copy feature does not remove the shape from the original location.

To copy and paste a shape:


1. Click the Star shape to select it.
2. On the Home tab of the Ribbon, in the Clipboard group, click the Copy button .
3. On the Home tab of the Ribbon, in the Clipboard group, click the Paste button .A
copy of the selected shape is placed on the drawing page.
4. Click in a blank area of the drawing page to deselect the shape.

Deleting Shapes
To delete a shape, it must first be selected. Shapes can be deleted one at a time or several at once. If
a shape is selected, the entire shape and any text contained within the shape will be deleted. However,
if only the text within a shape is selected, then only the selected text will be deleted.

To delete a shape:
1. Click the Star shape to select it.
2. Press the Delete key.
Working with Text
Visio allows users to enhance drawings by adding text to shapes as well as in blank areas of a drawing
page. All text in a Visio drawing is contained in a text block.

Adding Text to Shapes


All Visio shapes contain text blocks by default. To add text to a shape, you simply double-click the
shape and start typing. Visio automatically expands the width of the text block as text is added. You
can press the Enter key at any time to begin a new line of text. When you move a shape with text,
the text block automatically moves with it.

To add text to a shape:


1. Open the.vsd file.
2. Double-click the shape in the drawing page.
3. Type start, press the Enter key.

Text Added to a Shape

Adding Text to Pages


You can use the Text feature to add text to a Visio drawing that is independent of any shapes. For
example, you can create a text block to use as a page title. To add text to a page, either click where
you want to add the text and begin typing, or drag to create a text block first, and then begin
typing. The text automatically wraps when it reaches the end of the text block area.
Text Added to a Page
To add text to a page:

1. On the Home tab of the Ribbon, in the Tools group, click the Text button .
2. In the upper-right area of the drawing page, drag to create a text block that is
approximately four inches wide by one inch high.
3. Type text & press the Enter key

4. On the Home tab of the Ribbon, in the Tools group, click the Pointer Tool button to
exit text edit mode.
NOTE: If you need to make any changes to the text, double-click the text to enter edit mode,
make the desired changes, and then click in a blank area of the drawing page to deselect the text block.

Connecting Shapes
In Visio, connectors are used to connect shapes to
each other. Connectors can be lines, arcs, arrows,
hubs, cables, etc. These are used to reflect items such
as a path in a process, a relationship between shapes,
or a hierarchy. Connectors can be created using the
Connector tool or Auto Connect.

Connected Shapes
Using the Connector Tool
One of the most flexible ways to add and glue a connector is to draw it by using the Connector tool.
This tool allows you to create a point-to-point or shape-to-shape connection between two shapes.
With a point-to-point connection, the connector stays glued to the same connection points when
either one of the shapes is moved. With a shape-to-shape connection, the connector stays glued to
each shape by moving to the closest available connection points when either one of the shapes is
moved.

To create a point-to-point connection:


1. Open the .vsd file.
2. On the Home tab of the Ribbon, in the Tools g roup, click the Connector button .
3. In the first row of shapes, drag from the right c onnection point on the first Process
shape to the left connection point on the Document shape .
4. On the Home tab of the Ribbon, in the Tools group, click the Pointer Tool button .
5. Drag the Process shape to a new location on the drawing page. Notice that the connector stays
glued to the same connection points.
6. Click in a blank area of the drawing page to deselect the shape.

Point-to-point Connection Using the Connector Tool


Grouping Shapes
In Visio, shapes can be grouped together and treated as a single unit. This feature is useful
when you want to move, resize, flip, or rotate several shapes at once.
Grouping and Ungrouping Shapes
Grouping allows you to move several shapes to a different location while preserving the alignment
and spacing between each shape. If you need to make changes to individual shapes in a group,
you can ungroup the shapes.
To group shapes:
1. Open the .vsd file.
2. On the Home tab of the Ribbon, in the Tools group, click the Pointer Tool button .
3. In the upper-left area of the drawing page, hold down the Shift key and click to select the
shape,

Shapes Selected for Grouping


4. On the Home tab of the Ribbon, in the Arrange group, click the Group button , and then click
Group on the menu.
5. Drag the group to a new location on the page. Notice that all the shapes in the group move together.

To ungroup shapes:
1. In the lower-right area of the drawing page, click to select the shapes to ungroup.
2. On the Home tab of the Ribbon, in the Arrange group, click the Group button , and then click
Ungroup on the menu. Each shapes can now be moved individually.
3. Click in a blank area of the drawing page to deselect the shapes.

Task 1
Draw the following Flowcharts

Conclusion
____________________________________________________________________________________________________

____________________________________________________________________________________________________
Lab 11
Objective:
To understand the Turbo IDE Programming environment

1. Introduction to Turbo C IDE and Programming Environment.


2. Steps involved in writing and executing a program
3. C Compiler
4. C standard library

C is a general purpose computer programming language, originally developed by Dennis Ritchie in late 60’s and early 70’s,
in Bell Laboratories. C is a successor of B language which was introduced around 1970.

1. Integrated development environment (IDE)


The IDE is also known as integrated design environment or integrated debugging environment, is a software application
that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of

 GUI builder/ a source code editor


 a compiler and/or an interpreter
 build automation tools
 a debugger

Visual Studio, Delphi, JBuilder, FrontPage and DreamWeaver are examples of IDEs

2. Steps involved in writing and executing a program


3. C Compiler
It translates the C source code into object code. It take some time to analyze and process a program, the resulting executable
is some form of machine- specific binary code. The computer hardware interprets (executes) the resulting code, hence
the program execution is fast.

 Creating a program

Use a editor to write the source code. This file contains a source code which consists of executable code. Save the file
with .c extension only.

--Preprocessing: Using a Preprocessor program to convert C source code in expanded source code. "#includes"
and "#defines" statements will be processed and replaced actually source codes

 Compiling the program

The next step is to compile the program. The code is compiled by using compiler. i.e. object code. The compiler program
convert C expanded source to assembly source code.

-- Assembly: Using a Assembler program to convert assembly source code to object code.

 Linking a program to library

The object code of a program is linked with libraries that are needed for execution of a program. The linker is used to
link the program with libraries. It creates a file with .exe extension. Multiple units of object codes are linked together.

 Execution of program

The final executable file is then run by the command.

--Loading: Using a Loader program to load the executable code into CPU for execution.

4. C standard library

A C library is a file containing several object files, that can be used as a single entity in a linking phase of a program.
Normally the library is indexed, so it is easy to find symbols (functions, variables and so on) in them. For this reason, linking
a program whose object files are ordered in libraries is faster than linking a program whose object files are separate on the
disk.

The C standard library consists of a set of sections of the ISO C standard which describe a collection of headers and library
routines used to implement common operations, such as input/output and string handling.

For instance

#include <stdio.h>
#include <conio.h>

Conclusion
Lab 12
Objective:

To understand the C Preprocessor directives.


1. C Preprocessor directives
2. Header Files.
3. Data Types.
4. Format specifiers.
05.

1. C Preprocessor directives
A Preprocessor is a program that processes the code before it passes through the compiler. The preprocessor directives are
placed in the source program before the main line before the source code passes through the compiler it is examined by
the preprocessor for any preprocessor directives. The preprocessor is executed before the actual compilation of code begins.
Preprocessor directives follow the special syntax rules and begin with the symbol # and do not require any semicolon at the
end.

For example:

#include Specifies a file to be included

#define Defines a macro substitution

2. Header Files
Header file contains C function declarations, variable, subroutines and other identifiers. which can be incorporated into any C
program by using the pre-processor #include statement. It have a .h extension. Header files contain definitions of functions
and variables. There are two types of header files: the files that the programmer writes and the files that come with C
compiler. It also contains function prototypes (declarations) and structure definitions from the standard C stream library.

For example:

#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<graphic.h>
#include<string.h>

Program example:

#include <stdio.h> #include <stdio.h>


#include <conio.h> #include <conio.h>
main( ) main( )
{ {
printf ("Welcome to NFC IET"); Clrscr( );
getch( ); printf ("Welcome to\n");
} printf ("my class");
getch( );
}
3. Data Types

A data type is an amount of storage allocated to variables. The Data type determines the permissible operations on variables. A
program usually contains different types of data types like integer, float, character etc. and need to store the values being
used in the program. The variables should be declared by specifying the data type.

Type Storage size Value range


char 1 byte -128 to 127 or 0 to 255
unsigned char 1 byte 0 to 255
signed char 1 byte -128 to 127
int 4 bytes -2,147,483,648 to 2,147,483,647
unsigned int 2 or 4 bytes 0 to 65,535 or 0 to 4,294,967,295
short 2 bytes -32,768 to 32,767
unsigned short 2 bytes 0 to 65,535
long 4 bytes -2,147,483,648 to 2,147,483,647
unsigned long 4 bytes 0 to 4,294,967,295
Float 4
Double 8

Format Specifiers
These are the operators used in printf() function to print the data which is referred by an object or a variable. The Format
specifier is the sequence passed as the formatting string argument.
Following are the most common used format specifiers.

Data Type Format Specifiers


signed decimal integer %d
single character %c
string %s
float %f
double %lf
unsigned decimal integer %u
unsigned hexadecimal integer %x

Escape Sequence
The character combinations, which comprise a backslash (\) followed by some character. They are also called white spaces
because they are not displayed on the screen.

Escape Sequence Represents


\n New line
\t Horizontal tab
\v Vertical tab
\r Carriage Return
\' Single quotation mark
\" Double quotation mark
\\ Backslash
Lab Task

1. What does following program block do?

int a, b, c, d; int a;
a = 0; clrscr( );
b = 4; printf("Enter the number");
c = (a++) + b; scanf("%d",&a);
printf ("a = %d, b = %d,c = %d " , a, b, c); d (a%2==0)?printf("even number"):printf("odd number");
= c && b + 3 * a; getch( );
printf ("d = %d", d);

Conclusion
Lab 13
Objective:

.
1. Use of variables.
2. Constants and operators.
3. Gech() ,Getche() ,Getchar( ) .

1. Variables

A variable is a meaningful name of data storage location in computer memory. Or it can be considered as a box that can hold a
single value. When using a variable, refer to memory address of computer.

Naming variables: The name of variable can be called identifier or variable name. The name can contain letters, digits and
the underscore. The length of name can be up to 247 characters long but 31 characters are usually adequate, keywords
cannot be used as a variable name.

Declaration of variables: In order to use a variable first declare it by specifying which data type is it to be. The syntax to
declare a new variable is to write the specifier of the desired data type like int, float followed by a valid variable identifier.
For example: int a; float nfc; int a,b,c;

Initializingofvariables: In declaration of a variable, its value is by default undetermined. To store a concrete value to a variable
is called the initialization of a variable.
Example: int a = 10; fload nfc=1.9; char ch = 'NFCIET';

Declaration and Initialization of variable with data type

Integer : int is used to define integer numbers


Example:
{
int a;
a = 5;
}

Float : float is used to define floating point numbers.


{
float nfc;
nfc = 5.6;
}

Double : double is used to define BIG floating point numbers. It reserves twice the storage for the number. On PCs this is likely
to be 8 bytes.
{
double Atoms;
Atoms = 2500000;
}

Character : char defines characters.


{
char Letter; Letter
= 'x';
}
Void : void type has no values therefore it can not be declare as variable as we did in case of integer and float. It is usually used
with function to specify its type

Format Specifiers
These are the operators used in printf() function to print the data which is referred by an object or a variable. The Format
specifier is the sequence passed as the formatting string argument.
Following are the most common used format specifiers.

Data Type Format Specifiers


signed decimal integer %d
single character %c
string %s
float %f
double %lf
unsigned decimal integer %u
unsigned hexadecimal integer %x

Escape Sequence
The character combinations, which comprise a backslash (\) followed by some character. They are also called white spaces
because they are not displayed on the screen.

Escape Sequence Represents


\n New line
\t Horizontal tab
\v Vertical tab
\r Carriage Return
\' Single quotation mark
\" Double quotation mark
\\ Backslash

Program example
#include <stdio.h> #include <stdio.h>
#include <conio.h> #include <conio.h>
main( ) main( )
{ {
int a=5, b=10, c; int a;
c=a+b; a = 10000;
clrscr( ); printf("My salary is %d.", a);
printf("%d",c); getch( );
getch( ); }
}

#include <stdio.h> #include<stdio.h>


#include <conio.h> #include<conio.h>
main( ) main( )
{ {
int a; int a, b, c;
clrscr( ); clrscr( );
printf("Enter a number\n"); printf("Enter two numbers to add\n");
scanf("%d", &a); scanf("%d%d",&a,&b);
printf("You entered %d\n", a); c = a + b;
getch(); printf("Sum of entered numbers = %d\n",c);
} getch( );
}
SignedandUnsignedVariables: The signed variables have positive and negative ranges, while unsigned variables represents
only zero and positive range.
#include <stdio.h>
Example: unsigned int sh = 10; int main( )
{
Program example: #include <stdio.h> int term;
main( ) term = 3 * 5;
printf("Twice %d is %d\n", term, 2*term);

printf("Three times %d is %d\n", term, 3*t


erm);
{
int m,y,d;
m = 1;
y = 2;
d = 3;
printf(" %d %d %d \n",m, y, d);
getch( );
}

Constants
A constant is a value of any type that has the same value and can never change. The constants can be any of the basic data
types i.e. they can be int, float or char. Constants are also known as literals i.e. constants and literals are one and the same. The
Character constants are enclosed between single quotes.

Example: 1, 2, 3, 4 OR ’a'

Operators
An operator is a symbol which used to command the computer to do a certain mathematical or logical
manipulations. C language has a rich set of operators which can be classified as

Arithmetic operators (+, -, *, / and %)


Relational Operators (<, >, <=, >=, ==, !=)
Logical Operators (&&, ||, !) represents AND, OR, NOT

Assignment Operators (+=, -=, *=, /=, %=, >>=, <<=, &=, ^=, |=)
It assigns values from right side operands to left side operand. Like C = A + B will assign value of A + B into
C.

 Increments and Decrement Operators (++, --)

 Conditional Operators

The conditional operators takes three arguments. It evaluates an expression returning a value if that expression is true and a
different one if the expression is evaluated as false. It consists of 2 symbols the question mark (?) and the colon (:)

like
condition ? result1 : result2
If the condition is true, result1 is returned else result2 is returned.
Examples:
10==5 ? 11: 12 It will return 12, since 10 not equal to 5
10!=5 ? 4 : 3 It will return 4, since 10 not equal to 5
12>8 ? a : b It will return the value of a, since 12 is greater than 8

Program example:
main(){
main( )
int a = 10, b = 11, c; c
{
= (a < b)? a : b
int i=5,,j=10,larger;
printf(“%d”, c);
larger = i > j ? i : j;
}
printf(“The largest of two numbers is %d \n”, larger);

 Bitwise Operators
it is used for the manipulation data at bit level. It operates on each bit of data. These operators are used for testing,
complementing or shifting bits to the right on left and it may not be applied to a float or double.

& Bitwise AND


| Bitwise OR
^ Bitwise Exclusive
<< Shift left
>> Shift right

First Consider 0101 =5


0110 =6

Now apply the operation by comparing each bit with another bit from most significant bit and obtain the result according
to the operator and convert the result into decimal.

AND =
& 0101
0110
--------------
0100 = 4

Program Example:

main( )
{
int x = 5, y = 6, and, or, xor, shift_left, shift_right;
clrscr();
and = x & y;
or = x | y;
xor = x ^ y; shift_left
= x << 1; shift_right
= y >> 1;
printf("%d AND %d = %d\n", x, y, and);
printf("%d OR %d = %d\n", x, y, or); printf("%d
XOR %d = %d\n", x, y, xor);
printf("Shift Left %d by 1 bit = %d\n", x, shift_left); printf("Shift
Right %d by 1 bit = %d\n", y, shift_right); getch();
}

2. Getch(), Getche() and Getchar()

Getch() It is a function that exist in Conio.h header file. It used to read or take the input character from keyboard without echo or
displaying that character on screen.

Example:

{
printf("Welcome to our class");

getch();
}

Getche() It is same as getch. It used to read or take the input character from keyboard and echo or display that character on
screen. For confirmation execute the following program and press Alt+F5, the displayed character will be available there.

Example:
{
printf("Welcome to our class");

getche();
}
Getchar() It read or take the input character from keyboard and echo or display that character on screen in addition it need to
press Enter key to return.

Example:
{
printf("Welcome to our class");

getchar();
}

Lab Task

1. Initialize two integer variables and add the result into third variable.
2. Write a program using conditional operators, initialize two variable, declare third variable, set the condition in-order
to print the greater number.

Conclusion
Lab 14
Objective:
1 PART A: Familiarization with Matlab screen
2 PART B: A minimal Matlab Session

Apparatus: Personal Computer, MATLAB


Theory:

MATLAB is a high performance language for technical computing. It integrates computation, visualization
and programming in an easy-to-use environment where problems and solutions are expressed in familiar
mathematical notation. It is particularly convenient for modeling, simulation, analysis and design of dynamic
systems.

The purpose of this introductory lab is to give you a quick introduction to Matlab enabling you to use the
software from the very beginning of the Signal & Systems course. To run MATLAB, double-click on the
MATLAB icon. Once the program is loaded you will see the prompt”>>” in the command window. The
command window is the main window in which we communicate with the MATLAB interpreter. Anything
typed after “%” sign is treated as a comment and ignored by MATLAB. First we will familiarize with the
Matlab screen.

Procedure

MATLAB has the following basic window components:


• Launch Pad Window
• to access all MATLAB services and toolboxes
• Command Window
- to execute commands in the MATLAB environment
• Current Directory Window
- to quickly access files on the MATLAB path
• Figure Window
- to display graphical output from MATLAB code
Basic Components of the MATLAB Environment
• Workspace Window
- to view variable definitions and variable memory allocations
• M-File Editor/Debugger Window
- to write M-files (includes color-coded syntax features)
- to debug M-files interactively (break points)
• MATLAB Path Window
- to add and delete folders to the MATLAB path
• Command History Window
- displays all commands issued in MATLAB since the last session (good for learning and verification)
MATLAB Command Window
• The command window allows you to interact with MATLAB just as if you type things in a calculator
• Cut and paste operations ease the repetition of tasks
• Use ‘up-arrow’ key to repeat commands (command history)
MATLAB Launch Pad Window
• The launch window allows you to quickly select among various MATLAB components and toolboxes
MATLAB Current Directory Window
• Provides quick access to all files available in your Path
• Provides a brief description (when files are commented out) of each M-file

MATLAB Editor/Debuger Window

• Provides the same functionality found in most programming language development environments
- Color codes MATLAB built-in functions (blue color)
- Easy access to cut, paste, print, and debug operations
- Checks balance in MATLAB function syntax
MATLAB Figure Window
• Displays the graphic contents of MATLAB code (either from Command Window, an M-file, or output from
MEX file)

MATLAB Workspace

As you develop and execute models in MATLAB the workspace stores all variables names and definitions
for you. All variables are usually available to you unless the workspace is clear with the ‘>>clear’ command
Getting Started:-

If you don’t know anything about Matlab, then Matlab help is the best way to learn about something. In the
command window of Matlab simply write ‘help’;
>> help
It will display list of all toolboxes included in Matlab. Then by investigating the name of toolbox or the name
of a function, which you would like to learn how to use, use the ‘help’ command:
>> help functionname
This command displays a description of the function and generally also includes a list of related functions. If
you cannot remember the name of the function, use the ‘lookfor’ command and the name of some keyword
associated with the function:
>> lookfor keyword
This command will display a list of functions that include the keyword in their descriptions. MATLAB also
contains a variety of demos that can be with the ‘demo’ command.

Matlab as a calucator

>>1+2*3 >>(1+2)*3
Ans = 7 ans = 9

Order of precedence is from left to right and from inner most parenthesis to outermost

Declaring and assigning a variable in Matlab

Variable name=value (or expression)


Default variable is and

Let x=1;
Y=3*x

Y=3
Complex Numbers:
MATLAB also supports complex numbers. The imaginary number is denoted with the symbol I or j. There
are different methods to declare a complex number which are given below

>> com=4+2i
com=4.0000 + 2.0000i
>> c=complex(1,-2)
c=1.0000-2.0000i

Conjugate: Imaginary Part:


>> c=conj(com) >> i=imag(com)
c = 4.0000 – i=2
2.0000I Angle in Radian:
Real Part: >> a_radian = angle(com)
>> r=real(com) a_radian = 0.4636
r=4 Angle in Degree:
Magnitude: >> a_degree = angle(com)*180/pi
>> mag=abs(com) a_
mag = 4.4721

Built-in Mathematical functions in MATLAB


MATLAB comes with a large number of built-in functions that operate on matrices on an element-
by element basis. These include

sin sine
cos cosine
tan tangent
asin inverse sine
acos inverse cosine
atan inverse tangent
exp exponential
log natural logarithm
log10 common logarithm
sqrt square root
abs absolute value
sign signum
for further functions see help elfun
help specfun
Before quitting, Save .m files in current work (default) directory of Matlab
To end a session
>>exit or quit

Conclusion
Lab 15
Objective: To become familiar with matrices and arrays and operations that can be performed on them
Apparatus: Personal Computer, MATLAB
Theory:

MATLAB stores variables in the form of matrices which are M ×N, where M is the number of rows and N
the number of columns. A 1 × 1 matrix is a scalar; a 1 × N matrix is a row vector, and M×1 matrix is a
column vector. You can enter matrices into MATLAB in several different ways:
• Enter an explicit list of elements.

• Generate matrices using built-in functions etc


Procedure:

To enter the matrix

Real scalar >> x = 5


Complex scalar >> x = 5+10j (or >> x = 5+10i)
Row vector >> x = [1 2 3] (or x = [1, 2, 3])
Column vector >> x = [1; 2; 3]
3 × 3matrix >> x = [1 2 3; 4 5 6; 7 8 9]

Generating Matrices using Function:


MATLAB software provides two major functions that generate basic matrices. 1-
zeros All zeros
2-ones All ones
Here is example

>> a(1,3) = 3% Assigning a value


>> a = ones(3,3) % Identity Matrix
A=
A=
0 0 3 0
1 1 1
0 0 0 0
1 1 1
0 0 0 0
1 1 1
0 0 0 0
>> a = Zeros(4,4); % Null/Empty/Zero
matrix

%Unit Matrix
The n × n identity matrix is a matrix of zeros except for having ones along its leading diagonal (top left to
bottom right). This is called eye (n) in Matlab
>>a=eye(3)
A=
1 0 0
0 1 0
0 0 1
%Diagonal matrix
A diagonal matrix is similar to the identity matrix except that its diagonal entries are not necessarily equal to
1.
>>d=[1 4 7];
>>D=diag(d)
D=
1 0 0
0 4 0
0 0 7

Generating vectors

Vectors can be generated using the ‘:’ command. For example, to generate a vector x that takes on the values
0 to 10 in increments of 0.5, type the following which generates a 1×21 matrix
>> x = [0:0.5:10];
Other ways to generate vectors include the commands: ‘linspace’ which generates a vector by specifying the
first and last number and the number of equally spaced entries between the first and last number, and
‘logspace’ which is the same except that entries are spaced logarithmically between the first and last entry

Accessing vector elements

Elements of a matrix are accessed by specifying the row and column. For example, in the matrix specified
by A = [1 2 3; 4 5 6; 7 8 9], the element in the first row and third column can be accessed by writing
>> x = A(1,3) which yields 3
The entire second row can be accessed with
>> y = A(2,:) which yields [4 5 6]
where the ‘:’ here means “take all the entries in the column”. A submatrix of A consisting of rows 1 and 2
and all three columns is specified by
>> z = A(1:2,1:3) which yields [1 2 3; 4 5 6]

Arithmetic matrix operations

The basic arithmetic operations on matrices (and of course scalars which are special cases
of matrices) are:
+ addition
- subtraction
* multiplication
/ right division

\ left division
^ exponentiation (power)
’ conjugate transpose

Arithmetic operations on matrices


Addition: Division:
>> d =a+b >> h=a/b
d=6 8 10 12 h=0.4023
Subtraction: Assigning an Element from a Matrix:
>> e =a-b >> i=a(1,3) % will assign elements in row
e=-4 -4 -4 -4 2 and columns 3 of matrix “a “to variable
Multiplication: “i”.
>> g =a*c g=70
Note : An error message occurs if the sizes of matrices are incompatible for the operation.
The difference between matrix multiplication and element-by-element multiplication is
seen in the following example
>>A = [1 2; 3 4]
A=
12
34
>>B=A*A
B=
7 10
15 22
>>C=A.*A
C=
14
9 16
The magic Function
MATLAB actually has a built-in function that creates magic squares of almost any size. Not surprisingly,
this function is named magic:
B = magic (4)
B=
16 2 3 13
5 11 10 8
9 7 6 12
4 14 15 1

Properties of MAGIC SQUARE:


You are probably already aware that the special properties of a magic square have to do with the various
ways of summing its elements. If you take the sum along any row or column, or along either of the two main
diagonals, you will always get the same number. Let us verify that using MATLAB.
The first statement to try is

sum(A)
MATLAB replies with
ans =
34 34 34 34
A'
Produces sum of rows
ans =
16 5 9 4
3 10 6 15
2 11 7 14
13 8 12 1
and
sum(A')'
produces a column vector containing the row sums
ans =
34
34
34
34
The sum of the elements on the main diagonal is obtained with the sum and the diag functions:
diag(A)
produces
ans =
16
10
7
1
and
sum(diag(A))
produces
ans =
34

Linear algebra functions on Matrices


Matrices can sometimes be inverted:

>> inv(B)
Note:A matrix can be inverted if and only if its determinant is nonzero: If you try to compute the inverse for
a matrix with non-zero determinant you will get a warning message:
Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate.
>> det(B);

Arrays
When they are taken away from the world of linear algebra, matrices become two-dimensional numeric
arrays. Arithmetic operations on arrays are done element by element. This means that addition and subtraction
are the same for arrays and matrices, but that multiplicative operations are different. MATLAB uses a dot, or
decimal point, as part of the notation for multiplicative array operations.
The difference between matrix multiplication and element-by-element multiplication is
seen in the following example
>>A = [1 2; 3 4]
A=
12
34
>>B=A*A
B=
7 10
15 22
>>C=A.*A
C=
14
9 16

Other query commands


We can get the size (dimensions) of a matrix with the command size:
Size(B)
Length(B) etc

Conclusion:
Lab 16
Objective:
1. PART A: Dealing with Polynomials & Partial Fraction Expansion
2. PART B: Plotting in Matlab
3. PART C: Solving ordinary differential equations (ODE) symbolically
Apparatus: Personal Computer, MATLAB
Theory:
MATLAB provides a full programming language that enables you to write a series of MATLAB statements
into a file and then executing them into a single document. Polynomials are used for the analysis of transfer
function because in case of transfer function we want to see output and input in the form of polynomial. So
it is important to study the polynomials in MATLAB. When trying to find the inverse Laplace transform (or
Z transform) it is helpful to be able to break a complicated ratio of two polynomials into forms that are on
the Laplace transform or Z transform table. We will illustrate here using Laplace transforms. This can be
done using the method of Partial fraction expansion (PFE) which is the reverse of finding a common
denominator and combining fractions. It is possible to do PFE by hand also. We will illustrate hand
computation only for the simplest case when there are no repeated roots and the order of the numerator
polynomial is strictly less than the order of denominator polynomial.

The primary tool we will use for plotting in MATLAB is plot().The MATLAB environment provides a wide
variety of techniques to display data graphically. The type of graph you choose to create depends on the
nature of your data and what you want to reveal about the data. You can choose from many predefined graph
types, such as line, bar, histogram, and pie graphs as well as 3-D graphs, such as surfaces, slice planes, and
streamlines. After you create a graph, you can extract specific information about the data. You can also edit
graph components as well as annotate graphs. Annotations are the text, arrows, callouts, and other labels
added to graphs to help viewers see what is important about the data .lastly you can print your graph on any
printer connected to your computer.

Though MATLAB is primarily a numeric package, it can certainly solve straightforward differential
equations symbolically as well using Math symbolic toolbox as demonstrated in this lab.
Procedure:
PART A: Dealing with Polynomials

Polynomials

Polynomials arise frequently in systems theory. MATLAB represents polynomials as row vectors of
polynomial coefficients. For example, the polynomial s2 +4s−5 is represented in MATLAB by the
polynomial >> p = [1 4 -5]. The following is a list of the more important commands for manipulating
polynomials.
roots(p) Express the roots of polynomial p as a column vector
polyval(p,x) Evaluate the polynomial p at the values contained in the vector x
conv(p1,p2) Computer the product of the polynomials p1 and p2
deconv(p1,p2) Compute the quotient of p1 divided by p2
poly2str(p,’s’) Display the polynomial as an equation in s
Declaring a Polynomial:

>> pol1= [1 2 4];


>> pol2= [1 4 8];
Roots of Polynomial: Division of two Polynomials
>> num=[2 5 4 6 4];
>> rt_pol1=roots (pol1) >> den=[6 66 35 2];
rt_pol1 =
>> [q r]=deconv(num,den)
-1.0000 + 1.7321i
q=
-1.0000 - 1.7321i
0.3333 -2.833
r=
Determining Coefficients from given Roots:
0 0.0000 179.3333
>> c=poly(rt_1)
104.5000 9.6667
>> c=poly(rt_pol1)
c = 1.0000 2.0000 4.0000
Integration of Polynomial
Function
Finding value of Polynomial at a given point: >> pol1=[1 2 4];
e=polyval(pol1,2) >> pol2=[1 4 8];
e =12 >> k=polyint(pol1)
k = 0.3333 1.0000 4.0000 0
Derivative of Polynomial function: >> m=polyint(pol1,pol2)
>> pol1=[1 2 4]; m = 0.3333 1.0000 4.0000
>> pol2=[1 4 8]; 1.0000 4.0000 8.0000
>> h=polyder(pol1) j = 4 18 40 32

Dealing with Partial Fraction expansion:

[R,P,K] = RESIDUE(B,A) finds the residues, poles and direct term of a partial fraction expansion of the ratio
of two polynomials B(s)/A(s).
[B,A] = RESIDUE(R,P,K), with 3 input arguments and 2 output arguments, converts the partial fraction
expansion back to the polynomials with coefficients in B and A.
Example :% given a ratio of polynomials G(s) = (3s + 7)/(s^3 + 6s^2 + 11s + 6),determine the corresponding
PFE
% this is done by first defining the numerator and denominator polynomials
>> num1=[3 7];
>> den1=[1 6 11 6];
>> [r ,p, k]=residue(num1,den1) % r is the vector of PFE coefficients is the vector of roots of den1 and k=0
if the degree of num1 < degree of den1
r=
-1.0000
-1.0000
2.0000
p=
-3.0000
-2.0000
-1.0000
k=
[]

PART B: Plotting in Matlab

The primary tool we will use for plotting in MATLAB is plot().The MATLAB environment provides a wide
variety of techniques to display data graphically. The type of graph you choose to create depends on the
nature of your data and what you want to reveal about the data. You can choose from many predefined graph
types, such as line, stairs, stem, bar, histogram, and pie graphs as well as 3-D graphs, such as surfaces, slice
planes, and streamlines. After you create a graph, you can extract specific information about the data. You
can also edit graph components as well as annotate graphs. Annotations are the text, arrows, callouts, and
other labels added to graphs to help viewers see what is important about the data .lastly you can print your
graph on any printer connected to your computer. Annotations can be added from the Insert menu like labels,
titles, legend, line, arrows, text arrow, double arrow, text box, rectangle, ellipse, axes, light etc.

Using Plotting Tools and MATLAB Code


Plot a Sine Wave in Continuous Time: Plot a Sine Wave in Stairs Form:
>> t = 0:0.1:20; >> t = 0:0.1:20;
>> y = sin(t); >> y = sin(t);
>> plot(t,y) >> stairs(t,y)
>> xlabel(‘t’) >> xlabel(‘t’)
>> ylabel(‘sin(t)’) >> ylabel(‘sin(t)’)
>> grid on >> grid on
>> title(‘plotting a sine wave’) >> title(‘plotting a sine wave’)
>> axis([0 20 -2 2]) >> axis([0 20 -2 2])

Customization of plots
There are many commands used to customize plots by annotations, titles, axes labels, etc.
A few of the most frequently used commands are
xlabel Labels x-axis
ylabel Labels y-axis
title Puts a title on the plot
grid Adds a grid to the plot
gtext Allows positioning of text with the mouse
text Allows placing text at specified coordinates of the plot
axis Allows changing the x and y axes
figure Create a figure for plotting
figure(n) Make figure number n the current figure
hold on Allows multiple plots to be superimposed on the same axes
hold off Release hold on current plot
close(n) Close figure number n
subplot(a,b,c) Create an a × b matrix of plots with c the current figure
orient Specify orientation of a figure

Procedure:

Titles & Labels:-

To put a title and label the axes, we use


>> title (’text’)
>> xlabel (’text’)
>> ylabel (’text’)
The strings enclosed in single quotes, can be anything of our Choosing

Grids:-

A dotted grid may be added by


>> grid

Line Styles & Colors:-


Various line types, plot symbols, and colous may be obtained with plot(x,y,s) where s is a character string
made from one element from any or all the following 3 columns:
b blue . point - solid
c cyan o circle : dotted
g green x x-mark -. dashdot
k black + plus -- dashed
m magenta * star
r red s square
w white d diamond
y yellow v triangle (down)
^ triangle (up)
< triangle (left)
triangle (right)

p pentagram
h hexagram
For example, plot (X,Y, ‘g:’) plots a green dotted line and plot(X,Y,’rd’) plots red diamond at each data point.
You may also edit colors and line styles directly from the menus which appear at the top of the figure
windowThe default is to plot solid lines. A solid white line is produced by
>> plot (x, y, ’w-’)
The third argument is a string whose first character specifies the colour (optional) and the second the line
style.

Multi–plots:-

Several graphs can be drawn on the same figure as:


>> plot (x, y, ’w-’, x, cos (2*pi*x), ’g--’)
A descriptive legend may be included with
>> legend (’Sin curve’, ’Cos curve’)
Which will give a list of line–styles, as they appeared in the plot command, followed by a brief description.
Matlab fitsthe legend in a suitable position, so as not to conceal the graphs whenever possible. For further
information do help plot etc. The result of the commands
>> plot (x, y, ’w-’, x, cos (2*pi*x), ’g--’)
>> legend (’Sin curve’, ’Cos curve’)
>> title (’Multi-plot ’)
>> xlabel (’x axis’), ylabel (’y axis’)
>> grid
Hold:-
A call to plot clears the graphics window before plotting the current graph. This is not convenient if we wish
to add further graphics to the figure at some later stage. To stop the window being cleared:
>> plot (x, y, ’w-’), hold
>> plot (x, y, ’gx’), hold off
“hold on” holds the current picture; “hold off” releases it (but does not clear the window, which can be done
with clf). “hold” on its own toggles the hold state.

Subplot:-

The graphics window may be split into an m × n array of smaller windows into which we may plot one or
more graphs. The windows are counted 1 to mn row–wise, starting from the top left. Both hold and grid work
on the current subplot.
>> subplot (221), plot (x,y)
>> xlabel (’x’), ylabel (’sin 3 pi x’)
>> subplot (222), plot (x, cos (3*pi*x))
>> xlabel (’x’), ylabel (’cos 3 pi x’)
>> subplot (223), plot (x, sin (6*pi*x))
>> xlabel (’x’), ylabel (’sin 6 pi x’)
>> subplot (224), plot (x, cos (6*pi*x))
>> xlabel (’x’), ylabel (’cos 6 pi x’)
subplot(221) (or subplot(2,2,1)) specifies that the window should be split into a 2 × 2 array and we select
the first subwindow.

Controlling Axes:-
If it is desired to plot a curve in a region specified by r = [x-min x-max y-min y-max]. Enter the command
axis(r). This command sets the scaling to the prescribed limits. Find-out more about the command “axis” by
typing:

help axis
If you wish to plot cos(t) of exercise 5 from time 0 to 10 seconds, and if you wish that the y-axis should be
from –2 to 2, then enter the following command:
axis([0 10 -2 2])Once a plot has been created in the graphics window you may wish to change the range of
x and y values shown on the picture
Property Editor

Figure properties can be changed interactively using the following commands:


• PlotEdit
- allows interactive changes to plots (add legend, lines, arrows, etc.)
• PropEdit
- Allows changes to all Handle Graphic properties in a MATLAB plot

Examples in Plotting
Example: Draw graphs of the functions
i. y = sin(x)/x
ii. u= (1/(x-1)2)+x
iii. v= (x2+1)/(x2-4)
iv. ((10-x)1/3-1)/(4 - x2)1/2
PART C: Solving ordinary differential equations (ODE) symbolically

Matlab has a command dsolve that solves ordinary differential equations (ODEs) symbolically.One form of
the dsolve command is
dsolve(‘ODE’,’initial conditions’)
In the ODE string,D is used to represent the first derivative and Dn represents the nth derivative.
Example

To solve the differential equation y’(t) = ay(t) subject to the initial conditions y(0)=c and assign the solution
to y,one give the commands

>> syms a c
>> y=dsolve('Dy=a*y','y(0)=c')
y=
c*exp(a*t)

Conclusion:

You might also like