Solved

Go back n times
You will be given a column vector (such as x = [1; 2; 3; 4; 5; 6]). If (n=3) you will return following; [ 1 NaN NaN NaN ...

mehr als ein Jahr ago

Solved

Covering area
As an extension of the problem <http://www.mathworks.com/matlabcentral/cody/problems/416-polygon-area>, find the area, bounded b...

mehr als ein Jahr ago

Solved

Determine the radius of a sphere provided four non-coplanar points on the surface of the sphere. pts = [x1 y1 z1; x...

mehr als ein Jahr ago

Solved

Stop a ZigZag scanning N*N Matrix at any diag you want
Suppose that we have a 2-D matrix and we try to obtain a 1-D array in zig-zag order, but not all values of our 2-D matrix e...

mehr als ein Jahr ago

Solved

Great Circle Distance
Find shortest between two points on a ball given their azimuthal and polar angles (in degrees) as well as the radius of the sphe...

mehr als ein Jahr ago

Solved

Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
If _p_ is the perimeter of a right angle triangle with integral length sides, { _a_, _b_, _c_ }, there are exactly three solutio...

mehr als ein Jahr ago

Solved

Prime Product
My professor has given a sequence of N numbers as a1, a2, ..., aN and asked me to find the smallest possible value of ai * aj su...

mehr als ein Jahr ago

Solved

longest common substring : Skipped character version
Two strings are given. Find the longest common substring between them. The substring characters need not be adjacent. They, howe...

mehr als ein Jahr ago

Solved

Alternative Dimensions
Given a multidimensional matrix, transform the matrix so the dimensions are in the order given by variable ord. For example, giv...

mehr als ein Jahr ago

Solved

Jack's hand in "Titanic" ♤
Given a series of cards, return true if it's the famous hand. Note that i pretend that poker cards goes from 1 to 10 so be care...

mehr als ein Jahr ago

Solved

how many of the entries are positive?
Given x= sin(linspace(0,10*pi,100)), how many of the entries are positive?

mehr als ein Jahr ago

Solved

matrix zigzag
Unfold a 2-D matrix to a 1-D array in zig-zag order, e.g., for matrix [ 1 2 3 ; 4 5 6 ; 7 8 9 ] the resulting 1-...

mehr als ein Jahr ago

Solved

Zigzag of square matrix
find zigzag of square matrix in one dimension array a=[1 2 3;4 5 6;7 8 9]; should return b= [1 2 4 7 5 3 6 8 9]

mehr als ein Jahr ago

Solved

GJam 2014 China Rd B: Sudoku Checker
This Challenge is derived from <http://code.google.com/codejam/contest/2929486/dashboard#s=p0 GJam 2014 China Sudoku>. Large Cas...

mehr als ein Jahr ago

Solved

Minimum Sum thru a Lower Triangle
This Challenge is to find the minimum cumulative sum that traverses from row-1 thru row-N via vertical/diagonal adjacent element...

mehr als ein Jahr ago

Solved

Remove TeX from string
Matlab’s TeX support in figure windows is great for displaying information in a visually appealing way. However, many of the TeX...

mehr als ein Jahr ago

Solved

Is the test point on the line segment?
Given the [x,y,z] coordinates for the three points pa, pb, and pc, return true if the test point pc is on the line segment with ...

mehr als ein Jahr ago

Solved

Initialize a varible with an integer value from a another variable which is assigned with a character value.
Initialize a varible with an integer value from a another variable which is assigned with a character value. ex: Test = 'c'...

mehr als ein Jahr ago

Solved

Backward Substitution
Solve a upper triangular linear set of equations as described in the following link: http://www.people.virginia.edu/~teh1m/cody/...

mehr als ein Jahr ago

Solved

Track Logic
A sensor produces either a hit (1) or a miss (0) for a given target once per scan. The sensor is also equiped with a tracker whi...

mehr als ein Jahr ago

Solved

Dealfun (1.0)
*Short description.* Write a function _dealfun_: [y1,y2,...,yn]=dealfun(fhandle,x1,x2,...,xn) which evaluates the f...

mehr als ein Jahr ago

Solved

Get the variable value from a string and generate sum
Get the variable value from a string. Example. x = 'A=10' y = 'B=20' Result = (x+y) Result = 30

mehr als ein Jahr ago

Solved

I want eval
A valid MATLAB statement containing a definition of a vector is passed as a string S. Determine the length of the vector. Inp...

mehr als ein Jahr ago

Solved

Find Month & day for given day number of a year
Find Month & day for given day number of a year (day number is any number ranging from 1 to 366)

mehr als ein Jahr ago

Solved

Code Wheel
Create a function that offsets each value in a given string by a given amount. For instance, codewheel('hello',1) s...

mehr als ein Jahr ago

Solved

UICBioE240 2.7
Given two 3-element vectors x1 and x2, create a 3 x 3 x 3 matrix Y where (:,:,1) has all values of x1 * x2, (:,:,2) has all valu...

mehr als ein Jahr ago

Solved

last n digit of a power function
Calculate the power of a given a base, exponent. Return the last n digit number. Example 1: base = 3; expo = 8; n = 3; ...

mehr als ein Jahr ago

Solved

Linear Least Squares (L2 fitting problem )
Given a set of real measurements (x(i), y(i)) find a line sol(1)x + sol(2) (more specifically furnish the vector with...

mehr als ein Jahr ago

Solved

Full combinations
Given n input vectors x1, x2, …, xn, generate a p*n matrix y whose rows contain all element-wise combinations of the vectors x1,...

mehr als ein Jahr ago

Solved

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

mehr als ein Jahr ago