frequency

changing the frequency of a soundfile in android

血红的双手。 提交于 2019-12-02 08:27:17
问题 I try to change the frequency of a single soundfile. I managed to do that in android with the SoundPool thing. But the result sounds really bad. So I stepped about the Fourier Transformation - but I am not sure if this is what I am looking for. I want to load a single file and change the frequency of that file every time that file is played. So I can create melodies out of one tone. Is that possible with android/java? This is the way I managed to do it. With "bad" I mean it sounds out of tune

Using a .fasta file to compute relative content of sequences

不打扰是莪最后的温柔 提交于 2019-12-02 08:11:02
问题 So me being the 'noob' that I am, being introduced to programming via Perl just recently, I'm still getting used to all of this. I have a .fasta file which I have to use, although I'm unsure if I'm able to open it, or if I have to work with it 'blindly', so to speak. Anyway, the file that I have contains DNA sequences for three genes, written in this .fasta format. Apparently it's something like this: >label sequence >label sequence >label sequence My goal is to write a script to open and

Appending Frequency Tables - With Missing Values

我怕爱的太早我们不能终老 提交于 2019-12-02 07:22:12
问题 The goal is to produce a frequency table of all my selected variables (about reading habits for 4 Newspapers) which in essence have the same possible values: 1= Subscribed 2= Every week 3= Sometimes 4= Never 0= NA (No Answers) The problem arises if one of the variables does not contain one of the possible value. For example, if no one is subscribed to that particular Newspaper. a <- c(1,2,3,4,3,1,2,3,4,3) b <- c(2,2,3,4,3,0,0,3,4,1) d <- c(2,2,3,4,3,0,0,0,0,0) e <- c(3,3,3,3,3,3,3,3,3,3) ta <

How to get the fundamental frequency from FFT?

一世执手 提交于 2019-12-02 06:24:09
I am developing a flash guitar, and the only apparent method to discover the frequency of the mic's data looks to be using FFT. Nevertheless, after something like 30 hours of research I could not discover the best way to do that. Should I use Harmonic Product Spectrum (HPS), Cepstrum or Maximum Likelihood? The tuner will have to show frequencys from 25 to 3000Hz. Also, if someone knows about some open source code ready to find the fundamental frequency, please tell me. I can translate it to ActionScript. Thanks! shams The simplest technique I've had success with is to use FFT and then perform

How to plot pie chart in R from a table with relative Frequency?

天涯浪子 提交于 2019-12-02 05:34:39
问题 I am brand new to R. I need to plot a pie graph. Now I have tried my best but it's not generating a pie chart for me. Below is my code. socialIssue <- matrix(c(245,112,153,71,133,306),ncol=1,byrow=T) rownames(socialIssue) <- c("Housing","Transportation","Health Care","Education","Food","Other") colnames(socialIssue) <- c("Frequency") socialIssue <- as.table(socialIssue) socialIssue/sum(socialIssue) cols <- rainbow(nrow(socialIssue)) pie(socialIssue$Frequency, labels=paste0(round(socialIssue

Calculating grouped variance from a frequency table in R

我与影子孤独终老i 提交于 2019-12-02 05:32:58
How can I, in R calculate the overall variance and the variance for each group from a dataset that looks like this (for example): Group Count Value A 3 5 A 2 8 B 1 11 B 3 15 I know to calculate the variance as a whole, ignoring the groups I would do: var(rep(x$Value, x$Count)), but how do I automatically calculate the variance for each group accounting for the frequency? E.g., the variance for group A, group B, etc.,.. I would like my output to have the following headers: Group, Total Count, Group Variance I have also reviewed this link; R computing mean, median, variance from file with

Extracting most frequent words out of a corpus with python

☆樱花仙子☆ 提交于 2019-12-02 05:24:34
问题 Maybe this is a stupid question, but I have a problem with extracting the ten most frequent words out of a corpus with Python. This is what I've got so far. (btw, I work with NLTK for reading a corpus with two subcategories with each 10 .txt files) import re import string from nltk.corpus import stopwords stoplist = stopwords.words('dutch') from collections import defaultdict from operator import itemgetter def toptenwords(mycorpus): words = mycorpus.words() no_capitals = set([word.lower()

Plot relative frequencies with dodged bar plots in ggplot2

ε祈祈猫儿з 提交于 2019-12-02 03:54:34
问题 can anybody answer how I can plot a bar-plot which maps a numeric x-variable to its relative frequency grouped by a factor in ggplot2? The important thing is: The relative frequencies should be calculated as groupwise frequencies within x-values belonging to one factor. Now they are calculated as x-values relative to the total number of x-values. To illustrates it, an example: library(ggplot2) data <-data.frame(x=runif(100,0:1), f=sample(1:3,100,replace=TRUE)) data$f <-factor(data$f) p <

Frequency distribution of a categorical variable in R

余生长醉 提交于 2019-12-02 03:40:38
问题 I am trying to prepare a frequency distribution table of a categorical variable in my data and I am using below code. But the output looks ok while I view it but not printing ok in report. # These lines are not needed because the data below is already # in that format # STI<-STI_IPD1%>% select(Q18_1,Q54) # STI$Q54<-as.factor(STI$Q54) STI = structure(list(Q18_1 = c(101L, 120L, 29L, 101L, 94L, 16L, 47L, 141L, 154L, 47L, 141L, 154L, 154L, 29L, 58L, 154L, 101L, 154L, 47L, 141L, 75L, 1L, 120L, 16L

SOLR term frequency

眉间皱痕 提交于 2019-12-02 03:36:01
I am using solr, and so far everything is going great. When I do a search, I want to get back how many times the search 'term' was per document, along with the document itself. I have found alot of information but after going trough it I still don't understand how I can do this. Is it that extreme hard ? Can anyone help me out? Altough I do get results, the fl field is always 0 http://localhost:8983/solr/collection1/select?q=text:*mySearchTerm*&fl=*,fl:termfreq(text,*mySearchTerm*) Ok, I found out that termfreq doesn't work for MultiValues fields. So I used a copy field and added termVectors=