A résolu


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

environ 12 ans il y a

A résolu


Sum of series V
What is the sum of the following sequence: Σk(k+1) for k=1...n for different n?

environ 12 ans il y a

A résolu


Sum of series IV
What is the sum of the following sequence: Σ(-1)^(k+1) (2k-1)^2 for k=1...n for different n?

environ 12 ans il y a

A résolu


Sum of series III
What is the sum of the following sequence: Σ(2k-1)^3 for k=1...n for different n?

environ 12 ans il y a

A résolu


Sum of series II
What is the sum of the following sequence: Σ(2k-1)^2 for k=1...n for different n?

environ 12 ans il y a

A résolu


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

environ 12 ans il y a

A résolu


GJam 2014 Rd 1c: Train Cars
This Challenge is derived from <http://code.google.com/codejam/contest/3004486/dashboard#s=p1 GJam 2014 Rd 1c: Reordering Train ...

environ 12 ans il y a

A résolu


Whole Number Concatenator
Write a function that concatenates whole numbers. For example: numcat(111,222) should return 111222 numcat(1,2,3,4,5) s...

environ 12 ans il y a

A résolu


Whole Number Un-Concatenator
Write a function that accepts an integer and an index digit and returns a vector containing two integers which are the leading a...

environ 12 ans il y a

A résolu


Find the first N zeros of the 666 function
Using the following definition of the 666 function for this problem: _f(n)=sin('nnn')-cos(n*n*n)_, write a function that returns...

environ 12 ans il y a

A résolu


Text processing - Help Johnny write a letter home from camp
Johnny overuses the word 'great'. Write a script that will help him with this and future letters. If a sentence contains more ...

environ 12 ans il y a

A résolu


What is the nth step in Conway's Life?
Based on <Problem 52. What is the next step in Conway's Life?> Generalize your solution to Problem 52 - Give the state of the...

environ 12 ans il y a

A résolu


length of a vector
Find twice the length of a given vector.

environ 12 ans il y a

A résolu


Evaluating a polynomial
Given the following polynomial and the value for x, determine y. y = 3x^5 – x^3 + 8x – 3 Example x = 1 y = 3 - 1 +...

environ 12 ans il y a

A résolu


Find out sum of all elements of given Matrix
Find out sum of all elements of given Matrix A=[1 2 3;4 5 6 ;7 8 9]; Answer must be: 45 *If you like this problem, pl...

environ 12 ans il y a

A résolu


Find the Next Legal Move in Reversi
<http://en.wikipedia.org/wiki/Reversi Reversi>, also known as Othello, is a game in which reversible white/black chips are place...

environ 12 ans il y a

A résolu


Path of least resistance - Move all direction
Extension of the wonderful <https://www.mathworks.com/matlabcentral/cody/problems/1049-path-of-least-resistance Problem 1049> (P...

environ 12 ans il y a

A résolu


Eight queens puzzle
The eight queens puzzle is the problem of placing eight chess queens on an 8×8 chessboard so that no two queens threaten each ot...

environ 12 ans il y a

A résolu


Power Times (of the day)
Many times throughout the day can represent mathematical equations. In this problem, we focus on times that represent powers. Fo...

environ 12 ans il y a

A résolu


Add one raw in given matrix as shown in example
*Add one raw in given matrix as shown in example* A=[1 0;0 1]; X=[3 5]; Answer must be:[1 0; 0 1;3 5]

environ 12 ans il y a

A résolu


Reshape a Vector
Write a function that accept three inputs. The first one is a row vector S. The second and third arguments are m and n which de...

environ 12 ans il y a

A résolu


Magnet and Iron
(Inspired from <http://www.mathworks.com/matlabcentral/cody/problems/112 Problem 112: Remove the air bubbles>) Iron (atomic n...

environ 12 ans il y a

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 12 ans il y a

A résolu


Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').

plus de 12 ans il y a

A résolu


Slicing the cube
A bored matlab enthusiast has a cube with volume n^3. He decides to paint the entire surface of the cube red. Then, with slices...

plus de 12 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 12 ans il y a

A résolu


Possible Opponents Matrix for single-elimination tournament
It's tournament time! Given a single-elimination tournament with 2^N competitors, compute the 2^N by 2^N matrix M such that M...

plus de 12 ans il y a

Problème


Possible Opponents Matrix for single-elimination tournament
It's tournament time! Given a single-elimination tournament with 2^N competitors, compute the 2^N by 2^N matrix M such that M...

plus de 12 ans il y a | 3 | 14 solveurs

A résolu


Calculate the Hamming distance between two strings
Inspired by a similar Cody problem found <http://www.mathworks.com/matlabcentral/cody/problems/93-calculate-the-levenshtein-dist...

plus de 12 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 12 ans il y a

Charger plus