<< Chapter < Page
  Digital signal processing - dsp     Page 11 / 24
Chapter >> Page >
Figure 3 . Program output in self-test mode.
Missing Figure.
(Remember, all six output images are displayed on top of one another in the upper-left corner of the screen. You must manually move them tosee all six images.)

A 3D parabola

The main method creates and displays a surface consisting of a 3D parabola. You can think of the surface as representing a one-quartersection of a bowl, or perhaps a satellite dish with the center of the dish in the upper left corner of the image. The top three images in Figure 3 are the images produced from the raw surface. The bottom three images are the imagesproduced by the log of the surface, (which is no longer a 3D parabola) .

The calibration scale

The calibration scale is displayed immediately below the image of each surface.

The images are stacked

When the program is executed, the six surfaces are stacked in the upper left corner of the screen. (You must physically move the images on the top to see the images on the bottom.) The stacking order of the surfaces from bottomto top is based on the values of the display parameter in the order 0, 1, 2, 3, 4, 5.

With and without axes

Some of the surfaces show axes and some do not. This is controlled by the value of the constructor parameter named axis . A true value for axis causes the axes to be drawn.

A window listener

The constructor defines an anonymous inner class WindowListener on the close button on the Frame (the X in the upper right hand corner of the Frame ) . Clicking the close button will terminate the program that uses an object of this class.

Testing

The program was tested using J2SE 8.0 and Win 7. Because the program uses Java features that were introduced in J2SE 5.0, it may not compile successfullywith earlier versions of Java.

The program named ImgMod29

The program named ImgMod29 is rather long, so as usual I will break it down and discuss it in fragments. You can view a complete listing of theprogram in Listing 29 near the end of the module.

The main method

The program consists of a top-level class named ImgMod29 , plus several inner classes. The class includes a main method that is use for self-testing the class. To put things in context, I will beginmy discussion with the main method.

The main method begins in Listing 1 .

Listing 1. Beginning of the main method.
public static void main(String[] args){int numberRows = 59; int numberCols = 59;double[][]data = new double[numberRows][numberCols];int blockSize = 2;

Local variables

The array for the surface elevation data

Listing 1 declares a 2D array of type double to contain the 3D surface elevation data values. This is a square array consisting of 59elevation values on each side. (However, there is no requirement for the surface to be square.)

The blocksize parameter

Listing 1 also defines a value of 2 for the blockSize parameter. This variable will be passed to the constructor for the ImgMod29 class, causing each elevation value to be plotted as a small square of four pixels, two pixels on each side of the square.

(The overall size of the display can be controlled by controlling the size of the array containing the surface elevation values and alsocontrolling the value of blockSize .)

Questions & Answers

how does Neisseria cause meningitis
Nyibol Reply
what is microbiologist
Muhammad Reply
what is errata
Muhammad
is the branch of biology that deals with the study of microorganisms.
Ntefuni Reply
What is microbiology
Mercy Reply
studies of microbes
Louisiaste
when we takee the specimen which lumbar,spin,
Ziyad Reply
How bacteria create energy to survive?
Muhamad Reply
Bacteria doesn't produce energy they are dependent upon their substrate in case of lack of nutrients they are able to make spores which helps them to sustain in harsh environments
_Adnan
But not all bacteria make spores, l mean Eukaryotic cells have Mitochondria which acts as powerhouse for them, since bacteria don't have it, what is the substitution for it?
Muhamad
they make spores
Louisiaste
what is sporadic nd endemic, epidemic
Aminu Reply
the significance of food webs for disease transmission
Abreham
food webs brings about an infection as an individual depends on number of diseased foods or carriers dully.
Mark
explain assimilatory nitrate reduction
Esinniobiwa Reply
Assimilatory nitrate reduction is a process that occurs in some microorganisms, such as bacteria and archaea, in which nitrate (NO3-) is reduced to nitrite (NO2-), and then further reduced to ammonia (NH3).
Elkana
This process is called assimilatory nitrate reduction because the nitrogen that is produced is incorporated in the cells of microorganisms where it can be used in the synthesis of amino acids and other nitrogen products
Elkana
Examples of thermophilic organisms
Shu Reply
Give Examples of thermophilic organisms
Shu
advantages of normal Flora to the host
Micheal Reply
Prevent foreign microbes to the host
Abubakar
they provide healthier benefits to their hosts
ayesha
They are friends to host only when Host immune system is strong and become enemies when the host immune system is weakened . very bad relationship!
Mark
what is cell
faisal Reply
cell is the smallest unit of life
Fauziya
cell is the smallest unit of life
Akanni
ok
Innocent
cell is the structural and functional unit of life
Hasan
is the fundamental units of Life
Musa
what are emergency diseases
Micheal Reply
There are nothing like emergency disease but there are some common medical emergency which can occur simultaneously like Bleeding,heart attack,Breathing difficulties,severe pain heart stock.Hope you will get my point .Have a nice day ❣️
_Adnan
define infection ,prevention and control
Innocent
I think infection prevention and control is the avoidance of all things we do that gives out break of infections and promotion of health practices that promote life
Lubega
Heyy Lubega hussein where are u from?
_Adnan
en français
Adama
which site have a normal flora
ESTHER Reply
Many sites of the body have it Skin Nasal cavity Oral cavity Gastro intestinal tract
Safaa
skin
Asiina
skin,Oral,Nasal,GIt
Sadik
How can Commensal can Bacteria change into pathogen?
Sadik
How can Commensal Bacteria change into pathogen?
Sadik
all
Tesfaye
by fussion
Asiina
what are the advantages of normal Flora to the host
Micheal
what are the ways of control and prevention of nosocomial infection in the hospital
Micheal
what is inflammation
Shelly Reply
part of a tissue or an organ being wounded or bruised.
Wilfred
what term is used to name and classify microorganisms?
Micheal Reply
Binomial nomenclature
adeolu
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Digital signal processing - dsp. OpenStax CNX. Jan 06, 2016 Download for free at https://legacy.cnx.org/content/col11642/1.38
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Digital signal processing - dsp' conversation and receive update notifications?

Ask