Gelöst


Remove entire row and column in the matrix containing the input values
Remove the entire row and column from the matrix containing specific values. The specified value can be a scalar or a vector. Fo...

etwa 4 Jahre vor

Gelöst


7 segment LED display
Given a whole number, output how many segments would be lit up to display it on a 7 segment LED display (see Wikipedia: http://e...

etwa 4 Jahre vor

Gelöst


Pancake sorting
Sort a stack of pancakes by flipping them using spatula. * There are _N_ pancakes with diameters _1:N_. * Spatula can be ins...

etwa 4 Jahre vor

Gelöst


Ned's queens
A tribute to Cody's five-year anniversary should also celebrate the people behind Cody, and in this particular case, our illustr...

etwa 4 Jahre vor

Gelöst


Matrix which contains the values of an other matrix A at the given locations.
If you have two matrices, which together give xc and yc coordinates into another matrix, eg : xc = [1 1 1; 2 2 1]; ...

etwa 4 Jahre vor

Gelöst


Produce the following matrix
Produce the following matrix x = [2 3 4] y_correct = [1 1/2 1/3; 2 1 1/4; 3 4 1];

etwa 4 Jahre vor

Gelöst


Zero Cross
Write a function that counts the number of times n a signal x changes sign. Examples x = [1 2 -3 -4 5 6 -7 8 -9 10 11] ...

etwa 4 Jahre vor

Gelöst


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

etwa 4 Jahre vor

Gelöst


Vector to 3-Column Matrix
Consider a vector *A* such as A = [1 2 3 3 4 5 6] Can you convert this vector to a three-column matrix like this: ...

etwa 4 Jahre vor

Gelöst


Remnant

etwa 4 Jahre vor

Gelöst


Compute the nth Pythagorean prime
Pythagorean primes have the form p = 4n+1, where n is an integer, and they can be written as the sum of squares of two integers....

etwa 4 Jahre vor

Gelöst


Matrix with different incremental runs
Given a vector of positive integers a (>=0); How does one create the matrix where the ith column contains the vector 1:a(i) poss...

etwa 4 Jahre vor

Gelöst


Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

etwa 4 Jahre vor

Gelöst


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

etwa 4 Jahre vor

Gelöst


Tribute to Ramanujan
The nth taxicab number, denoted as T(n), is defined as the smallest number that can be expressed as a sum of two positive algebr...

etwa 4 Jahre vor

Gelöst


Factor Digits
Check if a given number in an array of numbers is - Equidigital Number - A number that has the same number of digits as the num...

etwa 4 Jahre vor

Gelöst


Make a rainbow matrix (follow-up to checkerboard matrix)
Given an integer n, make an n-by-n matrix as shown below. The a(1,1) should be 0. As we move away from the top-left, the number ...

etwa 4 Jahre vor

Gelöst


Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

etwa 4 Jahre vor

Gelöst


Tent matrix
Create an n x n matrix that resembles one kind of tent. The variable n is provided to the function and will be an odd number. As...

etwa 4 Jahre vor

Gelöst


Do you like your boss?
Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

etwa 4 Jahre vor

Gelöst


Phoneword Translator
Given an alphanumeric telephone number (Ex. 1-800-COLLECT), return the purely numeric phone number as a vector. This problem use...

etwa 4 Jahre vor

Gelöst


Angle of triangle
For three unknown points a b c, given three sides ab bc ca, find three angles abc bca cab in radians. Your function should be a...

etwa 4 Jahre vor

Gelöst


Vector multiplication
Given two row vectors, v1 and v2, each representing an integer, such that the vector elements are the digits from left to right,...

etwa 4 Jahre vor

Gelöst


Find two triangular numbers whose sum is input.
Find two triangular numbers whose sum is _input_. Note: The difference beetween the triangular numbers should be minimum.

etwa 4 Jahre vor

Gelöst


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

etwa 4 Jahre vor

Gelöst


Triangle Numbers Below N
This is an offshoot of <http://www.mathworks.com/matlabcentral/cody/problems/5-triangle-numbers Cody Problem 5: Triangle Numbers...

etwa 4 Jahre vor

Gelöst


Create Combination
Motivation: In many problems, we need to create combinations with the function nchoosek. In some cases, however, choices are lim...

etwa 4 Jahre vor

Gelöst


How many jokers?
* Given DNA codes of a group of suspects, * and a code for certain types of jokers, * Count how many jokers of that type. * ...

etwa 4 Jahre vor

Gelöst


String math
You will be given a string that describes a simple math equation. Your job is to determine if the value of the equation is equal...

etwa 4 Jahre vor

Gelöst


What digit is it?
The function you are being asked to write will take three numbers (n,x,q) as input. The object of the function is to determine ...

etwa 4 Jahre vor

Mehr laden