A résolu


Implement simple rotation cypher
If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...

presque 13 ans il y a

A résolu


Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

presque 13 ans il y a

A résolu


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

presque 13 ans il y a

A résolu


Back to basics 1 - Saving
Covering some basic topics I haven't seen elsewhere on Cody. Given an input variable 'x', save it to disk in a file named 'co...

presque 13 ans il y a

A résolu


Remove the small words from a list of words.
Your job is to tidy up a list of words that appear in a string. The words are separated by one or more spaces. Remove all words ...

presque 13 ans il y a

A résolu


Subset Sum
Given a vector v of integers and an integer n, return the the indices of v (as a row vector in ascending order) that sum to n. I...

presque 13 ans il y a

A résolu


Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

presque 13 ans il y a

A résolu


Test for balanced parentheses
Given the input inStr, give the boolean output out indicating whether all the parentheses are balanced. Examples: * If ...

presque 13 ans il y a

A résolu


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

presque 13 ans il y a

A résolu


Duplicates
Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

presque 13 ans il y a

Réponse apportée
How can I make this nested for loop work?
There is currently nothing in the code you provided to change the value of *bc* from one loop to the next. The code you have wr...

presque 13 ans il y a | 0

Réponse apportée
how do i save looped output into 1 variable matrix
% X and Y are 3x19 matricies % % This syntax makes sure that if you end up having more (or less) columns % in the f...

presque 13 ans il y a | 2

| A accepté

Réponse apportée
Matrix of functions of two variables
If the function f(t) is linear with respect to t (e.g. f(t) = t.*4 + log(5)) then you can simply multiply your inputs and pass t...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
How to manipulate arrays based on the transitions of the array elements?
One way to do this is with a combination of logical indexing some knowledge of the problem. For instance we know that the _tran...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
It is possible to update a matrix each step?
It is possible to update a matrix in each iteration of a loop. Your code is currently updating the matrix K every iteration and...

presque 13 ans il y a | 0

| A accepté

A résolu


Rotate and display numbered tile
Imagine a square tile with four numbers on it, one on each edge. We will call these edges north, east, south, and west. If th...

plus de 13 ans il y a

A résolu


Stuff the Board
You have a stack of tiles to put onto an array-like playing board. Each tile has a number (always an integer), and the board var...

plus de 13 ans il y a

A résolu


Connect Four Win Checker
<http://en.wikipedia.org/wiki/Connect_Four Connect Four> is a game where you try to get four pieces in a row. For this problem, ...

plus de 13 ans il y a

A résolu


hackathon impossible
You might have found a solution to our <http://www.mathworks.com/matlabcentral/cody/problems/205-hackathon-the-beginnings previo...

presque 14 ans il y a

A résolu


the return of the hackathon
You might have found a solution to our <http://www.mathworks.com/matlabcentral/cody/problems/205-hackathon-the-beginnings previo...

presque 14 ans il y a

A résolu


Hackathon: the beginnings
I am thinking of a number between 1 and 10000... can you guess what this number is? *Description* The test suite has rando...

presque 14 ans il y a

A résolu


Number of 1s in the Binary Representation of a Number
*Description* Return the number of 1s in the (unsigned integer) binary representation of a number. This function should be ab...

presque 14 ans il y a

A résolu


Steal, Share, or Catch
You, I, and a few other characters are going to play a game of *Steal, Share or Catch*. We are going to play it 10,000 times vs...

presque 14 ans il y a

A résolu


Increment a number, given its digits
Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

presque 14 ans il y a

A résolu


Solve the Sudoku Row
*Description* A simple yet tedious task occurs near the end of most Sudoku-solving algorithms, computerized or manual. The ta...

presque 14 ans il y a

A résolu


Indexed Probability Table
This question was inspired by a Stack Overflow question forwarded to me by Matt Simoneau. Given a vector x, make an indexed pro...

presque 14 ans il y a

A résolu


Pattern matching
Given a matrix, m-by-n, find all the rows that have the same "increase, decrease, or stay same" pattern going across the columns...

presque 14 ans il y a

A résolu


Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

presque 14 ans il y a

A résolu


The Goldbach Conjecture
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

presque 14 ans il y a

A résolu


Elapsed Time
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

presque 14 ans il y a

Charger plus