Solved


04 - Scalar Equations 2
Define the variables a and b: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> <<http://samle.dk/STTBDP/Assignment1_4-b.png>...

9 years ago

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

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

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

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

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

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

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

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

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

10 years ago

Solved


Transpose of matrix
Transpose of matrix as per test cases

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

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

10 years ago

Solved


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

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

10 years 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,...

10 years 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;...

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

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

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

10 years 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)...

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

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

10 years ago

Solved


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

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

10 years 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] ...

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

10 years ago

Solved


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

10 years ago

Solved


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

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

10 years ago

Load more