Solved


fly fly away
A fly moves following a predefined sequence of discrete jumps (defined by the vectors _dx_ and _dy_) repeating the same sequence...

nästan 8 år ago

Solved


05 - Vector Equations 1
Define the vector _cVec_: <<http://samle.dk/STTBDP/Assignment1_2c.png>> (all the numbers from 5 to -5 in increments of -0....

nästan 8 år ago

Solved


Number of occurrences of letter in a text
Given an input text either as a string or as a cell array of strings, return a (1 x 26) matrix containing the number of occurren...

nästan 8 år ago

Solved


Matrix of Multiplication Facts
This is James's daughter again, sneaking into his Cody account. Thanks to your help in my math class last year, I did great! B...

ungefär 8 år ago

Solved


Now 20% off!
Furloughs are hitting government workers this year. To commemorate getting one unpaid day off each week until the end of Septem...

ungefär 8 år ago

Solved


Convert hex color specification to MATLAB RGB
Here's something that comes up all the time if you deal with web pages. Given a <http://www.w3schools.com/html/html_colors.as...

ungefär 8 år ago

Solved


Return the sequence element I
Given a positive integer, x, return a positive integer, y, which is the xth term in the sequence [1 2 2 3 3 3...], in which one ...

ungefär 8 år ago

Solved


Increasing sub-sequence (Level 1)
Given a vector, v, of real numbers, return a positive integer, n, representing the longest contiguous increasing sub-sequence co...

ungefär 8 år ago

Solved


Crunch that matrix!
You are given an M x N matrix. Write a script that will compress this matrix into an M x (N/3) matrix, where each of the terms ...

ungefär 8 år ago

Solved


Transpose of matrix
Transpose of matrix as per test cases

ungefär 8 år ago

Solved


Enlarge array
Given an mxn numeric array (A) and a 1x2 vector (sz) indicating the dimensions [p q] to enlarge each element, return an (m*p)x(n...

ungefär 8 år ago

Solved


Additive persistence
Inspired by Problem 2008 created by Ziko. In mathematics, the persistence of a number is the *number of times* one must apply...

ungefär 8 år ago

Solved


Reverse a string
Reverse the given string. Example input = 'reverse' output = 'esrever'

ungefär 8 år ago

Solved


How many days does the cat take to climb out of the hole?
A cat accidentally falls down a hole with sloping but rough sides. It can climb out of the hole of height h metres, but for ever...

ungefär 8 år ago

Solved


How to add?
* Imagine you are in 2222 Anno Domini, when everyone must learn how to add, * and competing for the highly prestigious post of,...

ungefär 8 år ago

Solved


Generate the Matrix!
Given n, generate the following matrix: a = [ n n-1 n-2 ... 2 1; n-1 n-1 n-2 ... 2 1; n-2 n-2 n-2 ... 2 1;...

ungefär 8 år ago

Solved


Permute diagonal and antidiagonal
Permute diagonal and antidiagonal For example [1 2 3;4 5 6;7 8 9] -> [3 2 1;4 5 6;9 8 7] WITHOUT diag function (and variable n...

ungefär 8 år ago

Solved


Community Problem 500!
In honor of this being the 500th Community problem, see if you can create a function that has a Cody size of 500. It can do any...

ungefär 8 år ago

Solved


Square Diagonal
If n is the given number, then make a diagonal matrix of size 2*2 with the square of that number.

ungefär 8 år ago

Solved


Matrix with different incremental runs
Given a vector of positive integers a = [ 3 2 4 ]; create the matrix where the *i* th column contains the vector *1:a(i)...

ungefär 8 år ago

Solved


Set defaults
Write a function that computes the volume of a cube. The function should be able to accept three inputs: the length, width, and...

ungefär 8 år ago

Solved


Test if a Number is a Palindrome without using any String Operations
*Description* Given an integer _X_, determine if it is a palindrome number. That is, _X_ is equal to the _X_ with the digits ...

ungefär 8 år ago

Solved


Tricky timing
Write a function that takes between 0.5 seconds and 0.6 seconds to run.

ungefär 8 år ago

Solved


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

ungefär 8 år ago

Solved


Detect a number and replace with two NaN's
Write code which replaces the number 1 with two NaNs. Example X = [ 1 2 NaN 4 1 3 7 NaN 1 4 NaN 2] ...

ungefär 8 år ago

Solved


While loop with branching
Write a while loop that adjusts userValue while userValue is less than 0 or greater than 80. If userValue is greater than 80, th...

ungefär 8 år ago

Solved


Remainder
Make 'y' equal to the remainder of 27 divided by 5. When x=27 and t=5

mer än 8 år ago

Solved


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

mer än 8 år ago

Solved


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

mer än 8 år ago

Solved


Eliminate unnecessary polygon vertices
Suppose you have an n-point polygon represented as an n-by-2 matrix of polygon vertices, P. Assume that the polygon is closed; t...

mer än 8 år ago

Load more