A résolu


Cull vector elements that contain a specified digit
Given inputs of (1) a row vector and (2) a digit, identify the elements of that vector that contain the digit, remove them, and ...

environ 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


Solving Quadratic Equations (Version 1)
Quadratic equations have the form: ax^2 + bx + c = 0. Example: x^2 + 3x + 2 = 0, where a = 1, b = 3, and c = 2. The equation has...

plus de 10 ans il y a

A résolu


Genome decoding
Inspired by a question on the answer forum: You are given a matrix of 8-bit integers which encodes a genome. Each integer can...

plus de 10 ans il y a

A résolu


Delete 2nd and 5th column of Given 6*6 matrix
Delete the 2nd and 5th columns of the given 6*6 matrix. Example Suppose A = magic(6) 35 1 6 26 19 ...

plus de 10 ans il y a

A résolu


Change the first and last diagonal element of the identity matrix to zero
Starting with the identity matrix, change first and last diagonal element to zero. Example If n=5 A = 0 0 ...

plus de 10 ans il y a

A résolu


BLOCK x3 (Version 3)
An extension to problems <http://www.mathworks.com/matlabcentral/cody/problems/2451-block-x3-version-1/ 2451> (by me) and <http:...

plus de 10 ans il y a

A résolu


Lightning strike distance: Writing a function
Write a function named LightningDistance that outputs "distance" given input "seconds". Seconds is the time from seeing lightnin...

plus de 10 ans il y a

A résolu


Dudeney Numbers: Numbers which are the cube of their decimal sum
From Wikipedia: _A Dudeney number is a positive integer that is a perfect cube such that the sum of its decimal digits is equa...

plus de 10 ans il y a

A résolu


Matrix Generation.
if input n =1, generate a matrix y = [1]

plus de 10 ans il y a

A résolu


Mongean Shuffle
A Mongean shuffle of an n card deck starts with putting the initial deck on the left hand side. * The top card of the deck is...

plus de 10 ans il y a

A résolu


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

plus de 10 ans il y a

A résolu


サイコロを作ろう
1から6までの独立かつランダムな数値を返すような関数を作成しましょう。 例: >> [x1,x2] = rollDice(); と入力すると x1 = 5 x2 = 2 のような解を返します。

plus de 10 ans il y a

A résolu


Find the area of the four walls
If length, breadth and height of the walls are given, find the area of the four walls.

plus de 10 ans il y a

A résolu


Reverse a matrix
Its simple. You have to reverse a given matrix.

plus de 10 ans il y a

A résolu


Concatenate two strings
Its very easy. Just concatenate two strings.

plus de 10 ans il y a

A résolu


Array ex-OR
There are in MATLAB logical functions such as _<http://www.mathworks.co.uk/help/matlab/ref/and.html and>,_ _<http://www.math...

plus de 10 ans il y a

A résolu


Palindrome Check
Check whether the entire matrix is palindrome or not. Example matrix = [7 8 7] matrix_reverse = [7 8 7] So the mat...

plus de 10 ans il y a

A résolu


Bit calculation
Give me the count of numbers from 1 to n having their last two bits as 0. For example function y = ret_count(4) y = x...

plus de 10 ans il y a

A résolu


2048 Next Move
Given a board in the game 2048 (see the game here: <http://gabrielecirulli.github.io/2048/ 2048>) and a direction ('up','down','...

plus de 10 ans il y a

A résolu


Complex transpose
Calculate the transpose of a matrix having complex numbers as its elements without changing the signs of the imaginary part. ...

plus de 10 ans il y a

A résolu


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

plus de 10 ans il y a

A résolu


Return the names and values of the input arguments of a function
Given a function name, return the names and values of the input arguments. e.g. function_name(arg1, arg2) is a function de...

plus de 10 ans il y a

A résolu


Compute hamming distance between two binary vectors represented using lists of 1-byte numbers
Let v and u be vectors of the same size with 8-bit integers (0-255). We want to compute the number of bits where those vectors d...

plus de 10 ans il y a

A résolu


Cumulative difference
Given an array, return the cumulative difference. Example a = [ 1 3 5 7 ] cumdiff = [ 1 2 1 -2 ]

plus de 10 ans il y a

A résolu


Broken numlock key, oppps !
The numlock key on my computer is pressed and is now broken, so I cant press it to switch off the numlock mode. And hence I am n...

plus de 10 ans il y a

A résolu


Back to basics - array operations
Without performing actual arithmetic operations on arrays, return feasibility of operation as true or false. True if given opera...

plus de 10 ans il y a

A résolu


Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

presque 11 ans il y a

Charger plus