Month: November 2014

Z-TRANSFORM

Posted on Updated on

Introduction, definition of z-transform, properties of z-transform, evaluation of

Inverse z-transform.

clip_image002[10]Introduction

Z-Transform is used for the transform of the discrete-time signals of one form to another form. Let x[n] is a given function, and then Z-Transform of x[n], X[z] isclip_image004[4].

clip_image006[4]X (z) =clip_image008[4]

1. Determine the Z-Transform of the following finite duration signals.

a). x(n)={3,1,2,5,7,0,1}

b). x (n) = {2, 4, 5, 4, 0, 1, 2}

c). x (n) = {1, 2, 5, 4, 0, 1}

d). x (n) = clip_image012[5](n)

e). x(n)= clip_image012[6](n-k)

f). x(n)= clip_image012[7](n+ k)

Solution:

a).

x(n)={3,1,2,5,7,0,1}

The position of arrow at five. Taking Z-transform, we get

X (z) =clip_image008[5]

= x (-3) clip_image016[6]+x (-2) clip_image018[6]+x(-1)clip_image020[8]+x (0)clip_image022[4]+ x (1)clip_image024+ x (2)clip_image026+ x(3)clip_image028

=3clip_image030 1 clip_image0322 clip_image034 5clip_image022[5]+7clip_image0360clip_image0381clip_image040

=3clip_image030[1] clip_image032[1]2 clip_image042 5+7clip_image036[1]0clip_image038[1]1clip_image040[1]

=3clip_image030[2] clip_image032[2]2 clip_image042[1] 5+7clip_image036[2]1clip_image040[2]

ROC: Entire z-plane except z=0 and z=clip_image044

b). x (n) = {2, 4, 5, 4, 0, 1, 2}

Solution: The position of arrow at four. Taking Z-transform, we get

X (z) =clip_image008[6]

=clip_image046x (-3) clip_image028[1]+x (-2) clip_image048+x(-1)clip_image050+x (0)clip_image022[6]+ x (1)clip_image024[1]+ x (2)clip_image052

=clip_image054 4 clip_image032[3]5 clip_image034[1] 4clip_image022[7]+0clip_image036[3]1clip_image038[2]2clip_image040[3]

=clip_image054[1] 4 clip_image032[4]5 clip_image042[2] 4clip_image0562clip_image040[4]

ROC: Entire z-plane except z=0 and z=clip_image044[1]

c). x (n) = {1, 2, 5, 4, 0, 1}

Solution: The position of arrow is not given. We will start from the first digit.

Taking Z-transform, we get

X (z) =clip_image008[7]

=clip_image046[1]x (0) clip_image058+x (1) clip_image020[9]+x (2)clip_image018[7]+x (3)clip_image040[5]+ x (4)clip_image060+ x (5)clip_image062

=clip_image064 2 clip_image036[4]5 clip_image038[3] 4clip_image040[6]+0clip_image0661clip_image062[1]

=clip_image064[1] 2 clip_image036[5]5 clip_image038[4] 4clip_image068

=clip_image064[2] clip_image070 clip_image072 clip_image074 clip_image076

ROC: Entire z-plane except z=0.

2. Determine the Z-Transform including the region of convergence of

x (n)=clip_image078

Solution: The Z-Transform for the given x(n) is

X (z) =clip_image008[8]

=clip_image080

=clip_image082+clip_image084+clip_image086+……….

= 1+ clip_image088 clip_image090……………

=clip_image092

= clip_image094

ROC:X (z) converges, when clip_image096 <1.

clip_image006[5] z >clip_image098

3. Find the Z-Transform of the following sequence

clip_image100

Solution: We know,

X (z) =clip_image008[9]

= clip_image102 clip_image104 clip_image106

={……….+clip_image108+clip_image110}+clip_image112+clip_image114+clip_image116+clip_image118+…}

+clip_image120 clip_image122 clip_image124 clip_image126 }

= {…..+ clip_image128+clip_image130} + {1 +clip_image132+ clip_image134+…} + {clip_image136+clip_image138+clip_image140+……}

= clip_image142+ clip_image144 + clip_image146

=clip_image148+clip_image150+clip_image152

4. Find the Z-Transform of the function x(n)=clip_image154 ,nclip_image1561

Solution: We know,

X (z) =clip_image008[10]

= clip_image158

= clip_image160

=clip_image162+clip_image164+clip_image166 +….

=clip_image168

clip_image006[6] X (z) converges, when clip_image096[1] <1, z>clip_image170

5. Find the Z-Transform of the function x(n)=clip_image172 ,nclip_image156[1]0

Solution: We know,

X (z) =clip_image008[11]

=clip_image174

= clip_image176

=clip_image178+clip_image180+clip_image182+….

= clip_image184

ROC: Entire z-plane.

clip_image186Z-Transform of some important functions

1. Unit impulse functions

clip_image012[8] (n)=1, for n=0

=clip_image188otherwise

We know,

X (z) =clip_image008[12]

=clip_image190

= {…..+0+0+1.z0+…..}

=1

ROC: Entire z-plane.

2. Unit step function

U (n) =1, for nclip_image156[2]0

=0, for n<0

We know,

X (z) =clip_image008[13]

=clip_image192

=clip_image194

=clip_image196+clip_image198+clip_image200+…

=clip_image202

=clip_image204

=clip_image206

clip_image208 ROC in the range of clip_image210<1 i.e. z>1

3. Find the Z-Transform of x (n) =clip_image212, nclip_image214.

Sol: We know,

X (z) =clip_image216

=clip_image218

=clip_image220

=clip_image222+clip_image224

= clip_image226+clip_image228

=clip_image230+clip_image232

=clip_image234

=clip_image236

=clip_image238

=clip_image240

4. *Find the Z-Transform of x (n) =clip_image242, nclip_image244

Sol: We know,

X (z) =clip_image216[1]

=clip_image246

=clip_image248

=clip_image250

= clip_image252

=clip_image254

=clip_image256

=clip_image258

=clip_image260

=clip_image262

5. Find the Z-Transform of x (n) =clip_image264, nclip_image244[1]

Sol:

We know,

X (z) =clip_image216[2]

=clip_image266

=clip_image268

=clip_image270

= clip_image272

=clip_image274

=clip_image276

=clip_image278

=clip_image280

=clip_image282

Posted By-: Vissicomp Technology Pvt. Ltd.

Website -: http://www.vissicomp.com

Advertisements

ASP.NET – Ajax Control

Posted on Updated on

The UpdateProgress Control:

The UpdateProgress control provides a sort of feedback on the browser while one or more update panel controls are being updated. For example while a user logs in or waits for server response while performing some database oriented job.

It provides a visual acknowledgement like “Loading page…”, indicating the work is in progress.

The syntax for the UpdateProgress control is:

<asp:UpdateProgress ID=”UpdateProgress1″

runat=”server”

DynamicLayout=”true”

AssociatedUpdatePanelID=”UpdatePanel1″ >

<ProgressTemplate>

Loading…

</ProgressTemplate>

</asp:UpdateProgress>

The above snippet shows a simple message within the ProgressTemplate tag, however it could be an image or other relevant controls. The UpdateProgress control will display for every asynchronous postback unless it is assigned to a single update panel using the AssociatedUpdatePanelID property.

Properties of the UpdateProgress Control

The following table shows the properties of the update progress control:

Properties Description
AssociatedUpdatePanelID Gets and sets the ID of the update panel with which this control is associated.
Attributes Gets or sets the cascading style sheet (CSS) attributes of the UpdateProgress control.
DisplayAfter Gets and sets the time in milliseconds after which the progress template is displayed. The default is 500.
DynamicLayout Indicates whether the progress template is dynamically rendered.
ProgressTemplate Indicates the template displayed during an asynchronous post back which takes more time than the DisplayAfter time.

Methods of the UpdateProgress Control

The following table shows the methods of the update progress control:

Methods Description
GetScriptDescriptors Returns a list of components, behaviors, and client controls that are required for the UpdateProgress control’s client functionality.
GetScriptReferences Returns a list of client script library dependencies for the UpdateProgress control.

The Timer Control:

The timer control is used to initiate the post back automatically. This could be done in two ways:

(1) Setting the Triggers property of the UpdatePanel control:

<Triggers>

<asp:AsyncPostBackTrigger

ControlID=”btnpanel2″

EventName=”Click” />

</Triggers>

(2) Placing a timer control directly inside the UpdatePanel to act as a child control trigger. A single timer can be the trigger for multiple UpdatePanels.

<asp:UpdatePanel ID=”UpdatePanel1″

runat=”server”

UpdateMode=”Always”>

<ContentTemplate>

<asp:Timer ID=”Timer1″ runat=”server” Interval=”1000″>

</asp:Timer>

<asp:Label ID=”Label1″ runat=”server”

Height=”101px” style=”width:304px”>

</asp:Label>

</ContentTemplate>

</asp:UpdatePanel>

Posted By-: Vissicomp Technology Pvt. Ltd.

Website -: http://www.vissicomp.com

Operator in SQL

Posted on Updated on

What is an Operator in SQL?

An operator is a reserved word or a character used primarily in an SQL statement’s WHERE clause to perform operation(s), such as comparisons and arithmetic operations.

Operators are used to specify conditions in an SQL statement and to serve as conjunctions for multiple conditions in a statement.

  • Arithmetic operators
  • Comparison operators
  • Logical operators
  • Operators used to negate conditions

SQL Arithmetic Operators:

Assume variable a holds 10 and variable b holds 20, then:

Operator Description Example
+ Addition – Adds values on either side of the operator a + b will give 30
Subtraction – Subtracts right hand operand from left hand operand a – b will give -10
* Multiplication – Multiplies values on either side of the operator a * b will give 200
/ Division – Divides left hand operand by right hand operand b / a will give 2
% Modulus – Divides left hand operand by right hand operand and returns remainder b % a will give 0

SQL Comparison Operators:

Assume variable a holds 10 and variable b holds 20, then:

Operator Description Example
= Checks if the values of two operands are equal or not, if yes then condition becomes true. (a = b) is not true.
!= Checks if the values of two operands are equal or not, if values are not equal then condition becomes true. (a != b) is true.
<> Checks if the values of two operands are equal or not, if values are not equal then condition becomes true. (a <> b) is true.
> Checks if the value of left operand is greater than the value of right operand, if yes then condition becomes true. (a > b) is not true.
< Checks if the value of left operand is less than the value of right operand, if yes then condition becomes true. (a < b) is true.
>= Checks if the value of left operand is greater than or equal to the value of right operand, if yes then condition becomes true. (a >= b) is not true.
<= Checks if the value of left operand is less than or equal to the value of right operand, if yes then condition becomes true. (a <= b) is true.
!< Checks if the value of left operand is not less than the value of right operand, if yes then condition becomes true. (a !< b) is false.
!> Checks if the value of left operand is not greater than the value of right operand, if yes then condition becomes true. (a !> b) is true.

SQL Logical Operators:

Here is a list of all the logical operators available in SQL.

Show Examples

Ads by InfoAd Options

Operator Description
ALL The ALL operator is used to compare a value to all values in another value set.
AND The AND operator allows the existence of multiple conditions in an SQL statement’s WHERE clause.
ANY The ANY operator is used to compare a value to any applicable value in the list according to the condition.
BETWEEN The BETWEEN operator is used to search for values that are within a set of values, given the minimum value and the maximum value.
EXISTS The EXISTS operator is used to search for the presence of a row in a specified table that meets certain criteria.
IN The IN operator is used to compare a value to a list of literal values that have been specified.
LIKE The LIKE operator is used to compare a value to similar values using wildcard operators.
NOT The NOT operator reverses the meaning of the logical operator with which it is used. Eg: NOT EXISTS, NOT BETWEEN, NOT IN, etc. This is a negate operator.
OR The OR operator is used to combine multiple conditions in an SQL statement’s WHERE clause.
IS NULL The NULL operator is used to compare a value with a NULL value.
UNIQUE The UNIQUE operator searches every row of a specified table for uniqueness (no duplicates).

Posted By-: Vissicomp Technology Pvt. Ltd.

Website -: http://www.vissicomp.com

DATA WAREHOUSING (introduction)

Posted on Updated on

INTRODUCTION TO DATA WAREHOUSING

  • A data warehouse is a repository of an organization’s electronically stored data. Data warehouses are designed to facilitate reporting and analysis.
  • A data warehouse is a powerful database model that significantly enhances the user’s ability to quickly analyze large, multidimensional data sets.
  • It cleanses and organizes data to allow users to make business decisions based on facts.
  • Hence, the data in the data warehouse must have strong analytical characteristics creating data to be analytical requires that it be  –subject- oriented, integrated, time – referenced and non – volatile.

 SUBJECT- ORIENTED DATA

·This means a data warehouse has a defined scope and it only stores data under that scope. So for example, if the sales team of your company is creating a data warehouse – the data warehouse by definition is required to contain data related to sales.

  • Data Warehouses group data by subject rather by activity. In contrast, transactional systems are organized around activities – payroll processing, shipping products, loan processing, and the like.
  • Data organized around activities cannot answer questions such as, “how many salaried employees have a tax deductions of ‘X’ amount across all branches of the company?’’ this request would require have searching and aggregation of employee and account records of all the branches.
  • Imagine the query response time for a company having branches all over the country with employee strength of 20,000!
  • In a data warehouse environment, information’s used for analysis is organized around subjects- employees, accounts sales, products, and so on. This subject specific design helps in reducing the query response time by searching through very few records to get an answer to the user’s question.

INTEGRATED DATA

  • Integrated data refers to de – duplicating information and merging it from many sources into one consistent location.
  • When short listing your top 20 customers, you must know that ‘’HAL’’ and ‘’Hindustan aeronautics limited’’ are one and the same. There must be just one customer number for any form of HAL or Hindustan aeronautics limited, in your database.

·         This means that the data stored in a data warehouse make sense. Fact and figures are related to each other and they are integrable and project a single point of truth.

  • Much of the transformation and loading work that foes into the data warehouse is centered on integrating data and standardizing it,

TIME – REFERENCED DATA

  • The most important and most scrutinized characteristic of the analytical data is its prior state of bing. In other words, time-referenced data essentially refers to its time – valued characteristic. For example, the user may ask ‘’what were the total sales of product ‘A’ for the past three years on New Year’s Day across region ‘Y’?’’ to answer this question, you need to know the sales figures of the product on new year’s day in all the branches for that particular region.
  • This means that data is not constant, as new and new data gets loaded in the warehouse, data warehouse also grows in size
  • Time – referenced data when analyzed can also help in spotting the hidden treads between different associative data elements, which may not be obvious to the naked eye. This exploration activity is termed ‘’data mining’’.

NON – VOLATILE DATA

  • Since the information in a data warehouse is heavily queried against time, it is extremely important to preserve it pertaining to each and every business event of the company. The non – volatility of data, characteristic of data warehouse, enables users to dig deep into history and arrive at specific business decisions based on facts.
  • This means that data once stored in the data warehouse are not removed or deleted from it and always stay there no matter what.

 NECESSITY –THE DATA ACCESS CRISIS

  • If there is a single key to survival in the 1990s and beyond, it is being able to analyze, plan, and react to changing business conditions in a much more repaid fashion. In order to do this, to managers, analysts, and knowledge workers in our enterprises, need more and better information.
  • Information technology (IT) has made possible the revolution in the way organizations operate throughout the world today. But the sad truth is, in many organizations, despite the availability of powerful computers on each desk and communication that span the globe, large numbers of executives and decision – makers cannot get their hands on exiting critical information in the organization.
  • Every day, organizations large and small, create billions of bytes of data about all aspects of their business; millions of individual facts about their customers, products, operations and people. But for the most part, this is locked up in a maze of computer systems and is exceedingly difficult to get at. This phenomenon has been described as “data in jail”.
  • Industry experts have estimated that only a small fraction of the data that is captured, processed and stored in the enterprise, is actually available to executives and decision makers. While technologies for the manipulation and presentations of data have literally exploded, it is only recently that those involved in developing IT strategies for large enterprise have concluded that large segments of the enterprise are “data poor”.

Posted By-: Vissicomp Technology Pvt. Ltd.

Website -: http://www.vissicomp.com

Comments in C++

Posted on

For the students of FYBSc (IT), SYBSc (CS), SYBCA

if…else statement

An if statement can be followed by an optional else statement, which executes when the boolean expression is false.

Syntax:

The syntax of an if…else statement in C++ is:

if(boolean_expression){   // statement(s) will execute if the boolean expression is true}else{  // statement(s) will execute if the boolean expression is false}

If the boolean expression evaluates to true, then the if block of code will be executed, otherwise else block of code will be executed.

Flow Diagram:

11

Example:

#include <iostream>

using namespace std;

int main ()

{

// local variable declaration:

int a = 100;

// check the boolean condition

if( a < 20 )

{

// if condition is true then print the following

cout << “a is less than 20;” << endl;

}

else

{

// if condition is false then print the following

cout << “a is not less than 20;” << endl;

}

cout << “value of a is : ” << a << endl;

return 0;

}

When the above code is compiled and executed, it produces the following result:

a is not less than 20;

value of a is : 100

The if…else if…else Statement:

An if statement can be followed by an optional else if…else statement, which is very usefull to test various conditions using single if…else if statement.

When using if , else if , else statements there are few points to keep in mind.

  • An if can have zero or one else’s and it must come after any else if’s.
  • An if can have zero to many else if’s and they must come before the else.
  • Once an else if succeeds, none of he remaining else if’s or else’s will be tested.

Syntax:

The syntax of an if…else if…else statement in C++ is:

if(boolean_expression 1)

{

// Executes when the boolean expression 1 is true

}

else if( boolean_expression 2)

{

// Executes when the boolean expression 2 is true

}else if( boolean_expression 3)

{

// Executes when the boolean expression 3 is true

}

else

{

// executes when the none of the above condition is true.

}

Example:

#include <iostream>

using namespace std;

int main ()

{

// local variable declaration:

int a = 100;

// check the boolean condition

if( a == 10 )

{

// if condition is true then print the following

cout << “Value of a is 10” << endl;

}

else if( a == 20 )

{

// if else if condition is true

cout << “Value of a is 20” << endl;

}

else if( a == 30 )

{

// if else if condition is true

cout << “Value of a is 30” << endl;

}

else

{

// if none of the conditions is true

cout << “Value of a is not matching” << endl;

}

cout << “Exact value of a is : ” << a << endl;

return 0;

}

When the above code is compiled and executed, it produces the following result:

Value of a is not matching

Exact value of a is : 100

Posted By-: Vissicomp Technology Pvt. Ltd.

Website -: http://www.vissicomp.com

RAID stands for Redundant Array of Inexpensive (Independent) Disks

Posted on Updated on

On most situations you will be using one of the following four levels of RAIDs.

  • RAID 0
  • RAID 1
  • RAID 5
  • RAID 10 (also known as RAID 1+0)

This article explains the main difference between these raid levels along with an easy to understand diagram.
In all the diagrams mentioned below:

  • A, B, C, D, E and F – represents blocks
  • p1, p2, and p3 – represents parity
  • RAID LEVEL 0

11

Following are the key points to remember for RAID level 0.

  • Minimum 2 disks.
  • Excellent performance ( as blocks are striped ).
  • No redundancy ( no mirror, no parity ).
  • Don’t use this for any critical system.

12

  • RAID LEVEL 1

Following are the key points to remember for RAID level 1.

  • Minimum 2 disks.
  • Good performance ( no striping. no parity ).
  • Excellent redundancy ( as blocks are mirrored ).
  • RAID LEVEL 5

13

Following are the key points to remember for RAID level 5.

  • Minimum 3 disks.
  • Good performance ( as blocks are striped ).
  • Good redundancy ( distributed parity ).
  • Best cost effective option providing both performance and redundancy. Use this for DB that is heavily read oriented. Write operations will be slow.
  • RAID LEVEL 10

14

Following are the key points to remember for RAID level 10.

  • Minimum 4 disks.
  • This is also called as “stripe of mirrors”
  • Excellent redundancy ( as blocks are mirrored )
  • Excellent performance ( as blocks are striped )
  • If you can afford the dollar, this is the BEST option for any mission critical applications (especially databases).

Posted By-: Vissicomp Technology Pvt. Ltd.

Website -: http://www.vissicomp.com

A0 & A1:

Posted on Updated on

These two input lines allow the to specify which one of the internal
register in the 8253 is going to be used for the data transfer. Fig
shows how these two lines are used to select either the control word
register or one of the 16-bit counters. Eg, if there is a ‘1’ on both A0 &
A1, and a ‘0’ an , then the is writing a control word to the control
word register. These two pins are usually connected to the address
bus lines of the same name (A0 & A1).

11

Control word register:
It is selected when A0 and A1 re 11. It the accepts information from
the data bus buffer and stores it in a register. The information stored
in then register controls the operation mode of each counter,
selection of binary or BCD counting and the loading of each counting
and the loading of each count register. This register can be written
into, no read operation of this content is available.

Counters:
Each of the times has three pins associated with it. These are CLK
(CLK) the gate (GATE) and the output (OUT).
CLK:
This clock input pin provides 16-bit times with the signal to causes the
times to decrement maxm clock input is 2.6MHz. Note that the
counters operate at the negative edge (H1 to L0) of this clock input. If
the signal on this pin is generated by a fixed fq oscillator then the
user has implemented a standard timer. If the input signal is a string
of randomly occurring pulses, then it is called implementation of a
counter.

GATE:
The gate input pin is used to initiate or enable counting. The exact
effect of the gate signal depends on which of the six modes of
operation is chosen.

OUTPUT:
The output pin provides an output from the timer. It actual use
depends on the mode of operation of the timer. The counter can be
read “in the fly” without inhibiting gate pulse or clock input.

Posted By-: Vissicomp Technology Pvt. Ltd.

Website -: http://www.vissicomp.com