Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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?

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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]

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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

etwa 12 Jahre vor

Gelöst


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

etwa 12 Jahre vor

Gelöst


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

etwa 12 Jahre vor

Gelöst


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

etwa 12 Jahre vor

Problem


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

etwa 12 Jahre vor | 3 | 11 Lösungsvorschläge

Gelöst


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

etwa 12 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 12 Jahre vor

Mehr laden