Solved


Are you in or are you out?
Given vertices specified by the vectors xv and yv, and a single point specified by the numbers X and Y, return "true" if the poi...

12 years ago

Solved


System of equations
Find a solution to a system of equations represented by a |n| by |n+1| matrix. For instance, [ 2 0 4; => 2*x = 4 ...

12 years ago

Solved


Find out missing number from a vector of 9 elements
You are given a vector of size 9, x = [x1 x2 x3 x4 x5 x6 x7 x8 x9] Elements of x may be randomly selected without repeati...

12 years ago

Solved


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

12 years ago

Solved


Back to basics 18 - justification
Covering some basic topics I haven't seen elsewhere on Cody. Given a string with extra spaces in front and/or in back, return...

12 years ago

Solved


Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] ...

12 years ago

Solved


Number of vertices of a hypercube
Return the number of vertices of a n-dimensional hypercube.

12 years ago

Solved


Calculate compression ratio of engine
Calculate compression ratio of engine given compression volume of cylinder(Vc), piston stroke(s) and valve diameter(d)

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

12 years ago

Solved


Basics: Divide integers to get integer outputs in all cases
Divide integers a and b in such a way that output y is always an integer (in ceil manner)

12 years ago

Solved


Determine value using Look-up table method
Given a set of 2 vectors x and y related in a certain way, you are supposed to find value of y (ydash) given a particular value ...

12 years ago

Solved


Saving MATLAB session to a file
How to save MATLAB session to a file?

12 years ago

Solved


Minimum Distance Point to Segment
This Challenge is to determine the minimum distance from a 2-D line segment defined by two points to a point. The point is (p...

12 years ago

Solved


Similar Triangles - find the height of the tree
Given the height, h1, of a power pole, shorter than a tree, a given distance, x2 away, please find h2, height of the tree. Pleas...

12 years ago

Solved


Volume of a Simplex
Return the volume of a <http://en.wikipedia.org/wiki/Simplex regular _n_-simplex> with a unit side length. Results are up to...

12 years ago

Solved


Edges of a n-dimensional Hypercube
Return the number of edges on an <http://en.wikipedia.org/wiki/Hypercube _n_-dimensional hypercube> (with an integer n &ge; 0). ...

12 years ago

Solved


Subset Sum
Given a vector v of integers and an integer n, return the the indices of v (as a row vector in ascending order) that sum to n. I...

12 years ago

Solved


Change a specific color in an image
The ability to change colors can be a useful tool in image processing. Given an m x n x 3 array (much like CData in images), fin...

12 years ago

Solved


Convert hex color specification to MATLAB RGB
Here's something that comes up all the time if you deal with web pages. Given a <http://www.w3schools.com/html/html_colors.as...

12 years ago

Solved


Nilpotent matrix
Check if matrix A is <http://mathworks.com/ nilpotent>.

12 years ago

Solved


Change the sign of even index entries of the reversed vector
change the signs of the even index entries of the reversed vector example 1 vec = [4 -1 -2 9] ans = [9 2 -1 -4] example2...

12 years ago

Solved


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

12 years ago

Solved


random picture with random colours
write a function which creates a random(x,y) matrix with random RGB colours for example create_pic(5,5) gives us a 3d matrix. ...

12 years ago

Solved


"mirror" matrix
Create n x 2n "mirror" matrix of this type: e.g. for n = 2 m = [1 2 2 1;1 2 2 1] e.g. for n = 3 m = [1 2 3 3 2 1...

12 years ago

Solved


Back to basics 2 - Function Path
Covering some basic topics I haven't seen elsewhere on Cody. Given a string that is the name of a MATLAB function, return a s...

12 years ago

Solved


Find a subset that divides the vector into equal halves
Given a vector x, return the indices to elements that will sum to exactly half of the sum of all elements. Example: Inpu...

12 years ago

Solved


Matrix indexing with two vectors of indices
Given a matrix M and two index vectors a and b, return a row vector x where x(i) = M(a(i),b(i)).

12 years ago

Solved


Return elements unique to either input
Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

12 years ago

Solved


Implement full adder circuit
Implement full adder circuit as given in <http://en.wikipedia.org/wiki/Adder_(electronics)> Inputs signals are a, b and ...

12 years ago

Solved


Who has power to do everything in this world?
There is only one person who is older than this universe. He is Indian version of Chuck Norris.

12 years ago

Load more