Solved


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

13 years ago

Solved


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

13 years ago

Solved


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

13 years ago

Solved


The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

13 years ago

Solved


Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

13 years ago

Solved


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

13 years ago

Solved


radius of a spherical planet
you just measured its surface area, that is the input.

13 years ago

Solved


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

13 years ago

Solved


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

13 years ago

Solved


inner product of two vectors
inner product of two vectors

13 years ago

Solved


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

13 years ago

Solved


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

13 years ago

Solved


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

13 years ago

Solved


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

13 years ago

Solved


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

13 years ago

Problem


Create a "map" of 2D wavelet coefficients
Generate a matrix that for an image of size r*2^S by c*2^S indicates index of the wavelet subbands after <http://en.wikipedia.or...

13 years ago | 0 | 3 solvers

Solved


Create a "map" of 2D wavelet coefficients
Generate a matrix that for an image of size r*2^S by c*2^S indicates index of the wavelet subbands after <http://en.wikipedia.or...

13 years ago

Solved


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

13 years ago

Problem


1D DCT-II transform.
Implement a function that calculates 1D Discrete Cosine Transform <http://en.wikipedia.org/wiki/Discrete_cosine_transform#DCT-II...

13 years ago | 1 | 20 solvers

Solved


1D DCT-II transform.
Implement a function that calculates 1D Discrete Cosine Transform <http://en.wikipedia.org/wiki/Discrete_cosine_transform#DCT-II...

13 years ago

Problem


Rearrange coefficients after block based DCT transform.
Two dimensional block-based discrete cosine transform <http://en.wikipedia.org/wiki/Discrete_cosine_transform#DCT-II (DCT-II)> i...

13 years ago | 0 | 3 solvers

Solved


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

13 years ago

Solved


Rearrange coefficients after block based DCT transform.
Two dimensional block-based discrete cosine transform <http://en.wikipedia.org/wiki/Discrete_cosine_transform#DCT-II (DCT-II)> i...

13 years ago

Solved


Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

13 years ago

Solved


Is the Point in a Circle?
Check whether a point or multiple points is/are in a circle centered at point (x0, y0) with radius r. Points = [x, y]; c...

13 years ago

Solved


Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

13 years ago

Solved


DC chopper
Input x is the sampled signal vector, may have both AC and DC components. output vector y should have AC components removed then...

13 years ago

Solved


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

13 years ago

Solved


Filter AC, pass DC
Input x is the sampled signal vector, may have both AC and DC components. Output vector y should not contain any AC component. ...

13 years ago

Solved


Is my wife right?
Regardless of input, output the string 'yes'.

13 years ago

Load more