Answered
write a three_max function
There are several issues with your code. It does not return an output. It overloads the max() function, which can lead to conf...

6 years ago | 0

| accepted

Answered
Low Pass filter not working
You show a figure that essentially looks like the following (also attached): fs = 1000; t = 0:1/fs:10; x = sin(2*pi*10*t); X...

6 years ago | 0

Answered
regexprep does not exactly what I want
There's definitely a way to do it using regexprep, but I found this solution first, so hopefully it is sufficient. Charge =...

6 years ago | 0

| accepted

Answered
Remove spikes from a matrix.
My version of nanmean only goes up to line 22 in R2019a, so I'm not sure what you have. Perhaps someone has written an overloade...

6 years ago | 1

| accepted

Answered
Audio sounds similar in volume before and after filtration of the most energetic frequency band
This has been solved. The answer was poor speakers and human threshold of hearing stow frequencies (as per the comments above).

6 years ago | 0

Answered
identifying the continuous sweep's envelope
I've had success using *PaddedHilbert* on the file exchange in the past. <https://www.mathworks.com/matlabcentral/fileexchange/...

6 years ago | 0

Answered
calculating residual between two time domain signals
It's unclear what you're trying to achieve, but yes that how to calculate the residuals (the difference between the observed val...

6 years ago | 1

| accepted

Solved


Read a column of numbers and interpolate missing data
Given an input cell array of strings s, pick out the second column and turn it into a row vector of data. Missing data will be i...

6 years ago

Solved


Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

6 years ago

Answered
incorrect result of fft phase calculation
I made only a few changes to your code and got satisfactory results. Nfft = length(Yin); The zero padding was doing odd things ...

6 years ago | 0

Answered
Signal filtering, smoothing and delay
I created a butterworth filter using filterDesigner, with the following parameters: Bandpass, IIR - Butterworth, specify order: ...

6 years ago | 0

| accepted

Answered
Find and count how many capital characters are in str, and then change them to lower cases USING LOOPS
s = 'This is my String with CapiTal LETTERS in it. Let''s change them to lowercase uSiNg LoOpS.' [caps,inds] = regexp(s,'...

6 years ago | 0

Solved


Sudoku square
We have a small Sudoku square, but one number is missing. x = [ 1 5 4 8 6 3 0 9 7 ] Make a function, wher...

6 years ago

Answered
Count how many ‘a’ are in str and eliminate those ‘a’
s = 'I have an apple'; [a,b] = regexp(s,'a','split'); numA = length(b); sentenceWithoutA = strjoin(a);

6 years ago | 0

Solved


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

6 years ago

Solved


Summing Digits within Text
Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...

6 years ago

Solved


Find the two-word state names
Given a list of states, remove all the states that have two-word names. If s1 = 'Alabama Montana North Carolina Vermont N...

6 years ago

Answered
Extracting selected parts from text - regular expressions
This will remove a space followed by any numbers followed by a dot follow by another number. regexprep(myText,' [0-9]*.[0-9...

6 years ago | 0

| accepted

Solved


Matrix Construction I
Given n, construct a matrix as shown in the example below. Example For n=8, the output should look like this: 1 2 3 4 ...

6 years ago

Solved


Numbers spiral diagonals (Part 1)
Inspired by Project Euler n°28 et 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the right...

6 years ago

Solved


Rainbow matrix
Create a "rainbow matrix" as described in the following examples Input = 3 Output = [ 1 2 3 2 3 2 ...

6 years ago

Solved


Generate this matrix
Generate the following matrix. n = 2; out = [-4 -3 -2 -1 0 -3 -2 -1 0 1 -...

6 years ago

Answered
How can I use conditional operators to improve my code?
N = [1:n]; s = [N;N;factorial(N)]; fprintf('For N = %d, %d! = %d\n',s);

6 years ago | 0

| accepted

Solved


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

6 years ago

Solved


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

6 years ago

Solved


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

6 years ago

Solved


Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

6 years ago

Solved


Return a list sorted by number of occurrences
Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

6 years ago

Solved


Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

6 years ago

Solved


Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

6 years ago

Load more