# 4.1 Java1482-spectrum analysis using java, sampling frequency,  (Page 4/24)

 Page 4 / 24

( Figure 4 shows the values read from the file named Dsp029.txt and displayed in an improved format.)

In this case, the third frequency in the list is one-half the sampling frequency, which is the folding frequency. The two frequencies on either side ofthat one have values that are symmetrical about the folding frequency.

Figure 4. A new set of frequency values.
```Data length: 50 Number sinusoids: 5Frequencies 0.1250.25 0.50.75 0.875Amplitudes 90.090.0 90.090.0 90.0```

## The program output

The five horizontal plots in Figure 5 show the result of running the program named Dsp029 with the frequencies shown in Figure 4 .

Figure 5. Program output for five sinusoids.

The center plot in Figure 5 is the sampled representation of the folding frequency.

The top two plots in Figure 5 are obviously the sampled representations of the two lower frequencies specified by the first two frequencies in Figure 4 .

## Not so obvious ...

However, it is not so obvious that the bottom two plots in Figure 5 are the sampled representations of the two higher frequencies specified by the last twofrequencies in Figure 4 . They look exactly like the top two plots but in reverse order.

## Unable to distinguish ...

Frequencies above one-half the sampling frequency are not distinguishable by viewing the sampled data. In fact, they are converted to lower frequencies bysampling process. The new lower frequencies fold around a point in the frequency spectrum given by one-half the sampling frequency. That is why it is called thefolding frequency. (In 1933, this frequency was named after scientist Harry Nyquist .)

## One more example

Let's look at one more example of plotted sinusoids. Consider the frequency values shown in Figure 6 . The second and third frequencies are symmetrical about the sampling frequency. The fourth and fifth frequencies are symmetrical abouttwice the sampling frequency. The first frequency value is the same distance from zero as the other four frequencies are from the sampling frequency andtwice the sampling frequency.

Figure 6. One more example.
```Data length: 50 Number sinusoids: 5Frequencies 0.10.9 1.11.9 2.1Amplitudes 90.090.0 90.090.0 90.0```

## The program output

Figure 7 shows the output produced by running the program named Dsp029 with the frequency parameters specified by Figure 6 .

Figure 7. Program output for five sinusoids.

## The sinusoids are indistinguishable

Although the actual frequencies of the five cosine functions are significantly different, once they are sampled, they are indistinguishable. Thesampling process converts the actual frequencies to new frequencies that not only fold around one-half the sampling frequency, they also fold around allmultiples of one-half the sampling frequency.

## Beginning of the class named Dsp029

The program named Dsp029 is provided in Listing 16 near the end of the module. I will break the program down and explain it in fragments,beginning with the fragment shown in Listing 1 .

Listing 1. Beginning of the class named Dsp029.
```class Dsp029 implements GraphIntfc01{ final double pi = Math.PI;//for simplification//Begin default parameters int len = 400;//data lengthint numberSinusoids = 5; //Frequencies of the sinusoidsdouble[] freq = {0.1,0.25,0.5,0.75,0.9};//Amplitudes of the sinusoids double[]amp = {75,75,75,75,75}; //End default parameters```

Describe frontal lobe syndrome
Frontal lobe syndrome is an impairment of the frontal lobe that occurs due to disease or head trauma.
Zafar
what does the bell curve represent in intelligence testing?
average
Angela
I'M A VERY CURIOUS PERSON WHO LOVES TO LEARN ABOUT DIFFERENT TYPES
I AM A PERSON WHO IS NOT CHOOSING TO LET MY MENTAL HEALTH AFFECT ME AND I AM AN
Sheri
different types means.?😂😂
rilek
Indeed....different types means what exactly and how does these different types transpire into our lives? there are many different ways of allowing ourselves to accommodate and continiously play out the fact we have mental illnesses!!!
Elizabeth
social learning theory
how we know the people are telling lie
Vasu
human brain
SERAJ
if you want to learn how to detect the lie you have to observe their behaviour...
Aayan
that's common things..
MOHD
anything specially, tht we can say either person is telling yes or no..?
MOHD
Yes
rochell
I believe there are many factors that play into being a human lie detector.
Tasha
all of which is governed by the human brain.
Tasha
There's no accurate method of telling someone is lying unless we know the truth ourselves. Some people, especially people with manipulative tendencies, will make a lie as believable as possible. Behaviors could tell the person is hiding something or may be feeling uncomfortable while being observed.
agii
Ex. Talking too fast while explaining a story might indicate that the person is indeed hiding something. Other than that, people, usually with histrionic personality disorder, also tend to exaggerate stories.
agii
DORFRLYN It's not easier to feel lied at first moment of talking to someone you know or you don't know. The person will be guilty of what they tell in the first sentence.They first find a way to hide the the truth. By so doing, the movement, and the head knock, this symbloyz the shift of origin
dorfrlyn
for one to tell lies, should first read the mind of the listener.
dorfrlyn
I agree with you Agil.Usually a person talks too fast,is hiding something true. But also talking too slow will mean creation of new story rather than the truth.
dorfrlyn
some people have the habit of speaking too fast, so in that case how can we identify whether the person is lying or not?
Labdhee
pay attention on facial expressions
El
When people talk too fast to the point that it's incomprehensible, it could mean that that person is trying to have you move one from one topic to another to prevent you from asking questions.
agii
observe micro expressions
Zafar
thanks to all for giving ans😃
Vasu
Any recommendations for apps related to positive psychology?
intresting I mean
Asfand
Sometimes if you type "positive psychology " in your play store, you'll get some good ones
Tahmetrea
I use Awakenings by Iyanla Vanzant... She have a positive outlook on life. She's awesome!
Tahmetrea
Thank you, I will check that out.
Andrew
CBT types?
Rachael
psychology FACTS
katy
ITS SUPER EASY TO USE ... and divides the kind of positive psychology your looking for into groups! check it out.
katy
mental association books?
Maya
CBT works, and I am also looking for a psych book to read... I like psychology facts
Andrew
anyone know about any bipolar advocate groups or support type groups where a person can talk n vent while remaining anonymous?
tonya
HI I'M SHERI AND IN ANSWER TO THE QUESTION ABOUT THE BIPOLAR SUPPORT GROUPS I LIVE IN SACRAMENTO CALIFORNIA AND I DO KNOW THAT THERE ARE MANY DIFFERENT GROUPS 1) WELLNESS RECOVERY PROGRAMS AND I KNOW OF 2 LOCATIONS ONE ON MARCONI IN NORTH SACRAMENTO AND ON BOWLING OFF FLORIN IN SOUTH SACRAMENTO
Sheri
what's the most common cause of suicide in adolescents
depression
Irfan
yes. it's depression.
Paul
Especially when adolescents go through identity issues. Not knowing if this boy wants to be a girl or vice or versa. Social awkwardness, depression and cruelty of other adolescents in my opinion, brings a lot of suicidal tendencies into the minds of them.
Tahmetrea
reasons that lead to depression caused by many reasons like rape, abusive parents or guardians, bullying and more causes for a person to suicide
Diana
not accepting the fact or situation or the reality. the adolescents can't face rejections, as soon as they are rejected , they commit suicide.
Labdhee
social pressures have a huge impact on this. I find that young people are more likely to take their own life because they feel they are not able to fit in to a particular group of society and feel they are criticised by others. environment and nature/nurture. identity is a huge factor.
Jody
I think a major problem is when someone feels they can't handle the situation or think it's out of the control even though there are a lot of ways to solve it, one of them being at least trying to tell someone, visit a psychologist. They might stop feeling alone/misunderstood by everyone else.
Thuy
well, I've a problem. I feel very conscious when I'm in a crowd. when I'm partying with friends, I feels like everyone is looking at me. when I look at them, each one of them have their eyes on me. I don't know how I should deal with this? can someone help me with that ?
puneet
Hey Puneet! I think it's the matter of time and getting comfortable in that kind of situation after you try to get out of your comfort zone and slowly get used to it. I used to have that problem too but then I acted to not give a 💩 and tried my best to pretend I didn't care at all. And it worked!
Thuy
*Fake it till you make it* in this case worked for me the best. Maybe you could try to start talking to one of the more open/friendly people in that group so you don't get that self-conscious. I'm sure they don't think they will judge you at all! Just do it!
Thuy
Rachael
Where do I go to find research or tips for integrating sex and mental heath?
integrating a sexual routine and a mental illness that has kept o e from intimacy for a prolonged time? can u be a Lil more specific
lindsay
I have experience with both
lindsay
y only these two.?
MOHD
yes
Abu
y only these two sex and mental
MOHD
knowledge some practice practical
Abu
so ur mentally in balanced with sex..cause you find a good satisfy partner.....
MOHD
u can explain
Abu
u can't find good sex partner....
MOHD
no
Abu
I m not understand your consepet
Abu
depends on your Lonely no family no friends
MOHD
ok
Abu
chill,u time to Understand these concepts..
MOHD
ok
Abu
u can explain in urdu
Abu
hi
Wendy
hi
Abu
please can you help me identify and explain atleast seven(7) reflexes of the new born.
Wendy
yes of course
Abu
Wendy
what's going on?
@lindsay I want to show how sexuality and mental health correlate. How one affects the other.
Felicia
I can help on these subjects
Abiral
@Abiral what information do you have?
Felicia
Hello
Irfan
Spending quiet time alone, with nature can improve mental health. Offer your opinions?
mmmm but me i cn not spend time alone
Different strokes for different folks 🤷🏽‍♂️
tsav
what do u mean
Some people prefer a quiet life to a busy, bright city life. Some lead very stressful lives. Those people often don't pay attention to how they feel apart from the obvious fact that they're tired and stressed
tsav
nature can be clarifying and soothing because it can be a mixture of just natural beauty and why else are nature sounds an option for white noise
Twisted
You're absolutely right
tsav
what is with human being brain that we don't know?
I guess there are lots of things we don't know, but perhaps your referring to that thing called Consciousness
GoldenWizard
Anything that happens, question it!
tsav
the science of many feelings and emotions can be hard to describe. our brains light up at some things but we can't always understand why
Twisted
But yet we must persist
tsav
Using relevant examples discuss challenges encounter by the beginning teachers during the learning and teaching process
how do I know when someone is using psychology on me?
If yes, it would always bring a solution.
Professor
Psychology cannot be used *on* something. You can use your *knowledge* of psychology to help tackle a situation. But I think I know what you're asking: pay attention to someone when you're talking, if they are looking at you up and down, they're analysing you
tsav
reasons for studying psychology in schools
PERSONALLY I'M A PERSON WHO LOVES TO LEARN READ AND WRITE AND RESEARCH ON DIFFERENT TYPES OF THINGS THAT HAVE TO DO WITH MY OWN EXPERIENCES WITH ADDICTION BORN WITH ORGANIC BRAIN DISEASE AND DAMAGE ENDURED EVERY FORM OF ABUSE THERE IS DOMESTIC VIOLENCE PTSD EDD (EMOTIONALLY DEVELOPMENTALLY DELAYED)
Sheri
I'M MILDLY MENTALLY CHALLENGED CAME OUT OF SEVERELY DYSFUNCTIONAL HOME MARRIAGE AND RELATIONSHIPS
Sheri
In my opinion, psyche meaning soul, makes me believe time should be taken to contemplate the history and root of the word. I believe psychology IS the study of the soul. The soul envelops human beings, carrying the body and the brain with it. In a sense, the Soul, is what we observe in people.
On point!
tsav
what type of this person who shake hand loosely
how we know a selfish person
Afaq
how we know a selfish person
Afaq
Insecure. Socially anxious or awkward, without self-confidence to interact as themselves, may seem arrogant, self-absorbed, rude or disinterested..... Narcissistic personality disorder?
Emma
lack of confidence and not having trust
Mehwish
how many types of intelligence
Ranjita
I couldn't understand the psychology
Yasir
which theory is given by wax wertheimer
the Gestalt theory
chindu
what did she say ?
Mehdi
Got questions? Join the online conversation and get instant answers!