Solved


02 - Vector Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2a.png>>

7 years ago

Solved


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

7 years ago

Solved


02 - Vector Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2b.png>>

7 years ago

Solved


01 - Scalar variables
Create the following variables: <<http://samle.dk/STTBDP/Assignment1_1.png>>

7 years ago

Solved


Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

7 years ago

Solved


Min of a Matrix
Return the minimum value in the given matrix.

7 years ago

Solved


Add offset to a signal
Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/add-offset-eqn.png>> You should see a downward...

7 years ago

Solved


Convert a vector into a number
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

7 years ago

Solved


Find perfect placement of non-rotating dominoes (easier)
Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

7 years ago

Solved


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

7 years ago

Solved


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

7 years ago

Solved


Add a block to a model
Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/add-block-eqn.png>> In this case, the slope of...

7 years ago

Solved


Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

7 years ago

Solved


Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

7 years ago

Solved


Produce a sine wave
Produce a sine wave with amplitude 3: <<http://blogs.mathworks.com/images/seth/cody/sine-eqn.png>>

7 years ago

Solved


Complex number
For complex number c=a+bi, write code that will add a and b together.

7 years ago

Solved


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

7 years ago

Solved


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

7 years ago

Solved


Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero? Clue: He was the first in the line ...

7 years ago

Solved


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

7 years ago

Solved


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

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

7 years ago

Solved


Do you like your boss?
Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

7 years ago

Solved


03 - Matrix Variables 4
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3d.png>> A 3x4 NaN (Not a Number) matrix (Hint: use ...

7 years ago

Solved


Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

7 years ago

Solved


Given an unsigned integer x, find the largest y by rearranging the bits in x
Given an unsigned integer x, find the largest y by rearranging the bits in x. Example: Input x = 10 Output y is 12 ...

7 years ago

Solved


Maximum running product for a string of numbers
Given a string s representing a list of numbers, find the five consecutive numbers that multiply to form the largest number. Spe...

7 years ago

Solved


Produce a cosine wave
Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/cosine-eqn.png>>

7 years ago

Solved


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

7 years ago

Solved


Function Iterator
Given a handle fh to a function which takes a scalar input and returns a scalar output and an integer n >= 1, return a handle f...

7 years ago

Load more