Question

Bucket a time signal to find its probability distribution

Hello, I want to know a way to find if a signal is fitting a gaussian distribution. So essentially it would take the signal , ...

1 year ago | 0 answers | 0

Solved

Get the area codes from a list of phone numbers

Given a string of text with phone numbers in it, return a unique'd cell array of strings that are the area codes. s = '508-647...

5 years ago

Solved

It dseon't mettar waht oedrr the lrettes in a wrod are.

An internet meme from 2003 (read more <http://www.snopes.com/language/apocryph/cambridge.asp here>) asserted that readers are re...

5 years ago

Question

Cobine two cell arrays with Nested Cellfun

Hi all, I have two cell arrays : A = {'13','15','17,'18'}; B = {'16','18','20','22','24',25','26','27,'28'}; I want to...

5 years ago | 1 answer | 0

Question

Building an array using parfor

Hi, I am building an array using parfor in the following fashion : parfor ifreq = 1:80 for iSig = 1:140 [...

5 years ago | 2 answers | 0

Question

Matfile supports only () indexing

I have a struct called data(which I created using load command from a -v7.3 matfile) : >> data = results: [1x1 struct...

5 years ago | 1 answer | 0

Question

Plotting discontinuos X Data

I have a data set that looks like this : datax = [6 7 8 9 14 48 49 50 55 87 88 89]; datay = [1 1 1 1 2 3 3 3 4 5...

5 years ago | 1 answer | 0

Solved

Fibonacci sequence

Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

5 years ago

Solved

Renaming a field in a structure array

MATLAB has a <http://www.mathworks.com/help/techdoc/ref/setfield.html setfield> and a <http://www.mathworks.com/help/techdoc/ref...

5 years ago

Solved

Triangle Numbers

Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

5 years ago

Solved

Find all elements less than 0 or greater than 10 and replace them with NaN

Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

5 years ago

Solved

Select every other element of a vector

Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

5 years ago

Solved

Column Removal

Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

5 years ago

Solved

Pangrams!

A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

5 years ago

Solved

Make a Palindrome Number

Some numbers like 323 are palindromes. Other numbers like 124 are not. But look what happens when we add that number to a revers...

5 years ago

Solved

Which doors are open?

There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

5 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...

5 years ago

Solved

Counting Money

Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

5 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...

5 years ago

Solved

Elapsed Time

Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

5 years ago

Solved

Reverse Run-Length Encoder

Given a "counting sequence" vector x, construct the original sequence y. A counting sequence is formed by "counting" the entrie...

5 years ago

Solved

De-dupe

Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

5 years ago

Solved

Replace May with April

For instance, if the input is input_str = 'The flowers may bloom in April'; then the output is output_str = 'The flo...

6 years ago

Solved

Find the longest sequence of 1's in a binary sequence.

Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

6 years ago

Solved

Determine if input is odd

Given the input n, return true if n is odd or false if n is even.

6 years ago

Solved

Cell joiner

You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

6 years ago

Solved

Bullseye Matrix

Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

6 years ago

Solved

Produce a cosine wave

Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/cosine-eqn.png>>

6 years ago

Solved

Summing digits

Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

6 years ago

Solved

Remove the vowels

Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

6 years ago