Solved


Perimeter
Given a sequence of points forming a closed path (first and last points are coincident) return the perimeter value. For example...

1 month ago

Solved


Zero Cross
Write a function that counts the number of times n a signal x changes sign. Examples x = [1 2 -3 -4 5 6 -7 8 -9 10 11] ...

1 month ago

Solved


Multiply Column
Given two input, one matrix and one scalar number For example A is a matrix given A = [ 1 2 2 5 2 5 2 3 4 6...

1 month ago

Solved


Jack's hand in "Titanic" ♤
Given a series of cards, return true if it's the famous hand. Note that i pretend that poker cards goes from 1 to 10 so be care...

1 month ago

Solved


Number Puzzle - 115

1 month ago

Solved


Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

1 month ago

Solved


Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...

1 month ago

Solved


Prime number check (★★)
One way to see if a number x is prime is to compute the remainders obtained when dividing x by all integers from 2 to √(x). If x...

1 month ago

Solved


Solve the recursion
Solve the recursion: f(n)=f(n-1)+1 + f(n-2)+2. f(1)=4; f(2)=8;

1 month ago

Solved


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

1 month ago

Solved


Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

1 month ago

Solved


Get the value 100
Knowing that 123-45-67+89=100, write a function that gives this result for any order of the digits in the input. Otherwise, the ...

1 month ago

Solved


Frequency Analysis of Text
Frequency analysis is a common task in cryptoanalysis. It is essentially counting the occurrences of alphabets (regardless of ca...

1 month ago

Solved


Namespace
Create a set of n variable names 'a_1',...,'a_n' The result should be a column oriented cell array of strings. Example inp...

1 month ago

Solved


Get chain of consecutive characters
Write a function that will output a chain of consecutive characters, given 2 letters as input. It has to work backwards too. Exa...

1 month ago

Solved


Energy Conversion 1

1 month ago

Solved


Weave two matrices together to form one matrix
Take the first column from matrix a, then insert the first column from matrix b, and so on. For example: a = [1 2 3 4]; b ...

1 month ago

Solved


check whether a number is a pentatope number
<https://oeis.org/A000332>

1 month ago

Solved


Back to basics 18 - justification
Covering some basic topics I haven't seen elsewhere on Cody. Given a string with extra spaces in front and/or in back, return...

1 month ago

Solved


Find Logic 15

1 month ago

Solved


Calculate the sum of two polynomials
Calculate the sum of two polynomials if they are written in notation with their coefficients. example: () + () = a=[3 4 ...

1 month ago

Solved


Draw a '7' in a zero matrix!

1 month ago

Solved


Solve t^(a*x^2+b*x+c)=s
Solve t^(a*x^2+b*x+c)=s. Return x vector as result. Example a=1, b=2, c=1, t=3, s=15. Result x(1)= 0.5700 x(2)=-2.5700 H...

1 month ago

Solved


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

1 month ago

Solved


Volume of a Simplex
Return the volume of a <http://en.wikipedia.org/wiki/Simplex regular _n_-simplex> with a unit side length. Results are up to...

1 month ago

Solved


Laws of motion 4
Given the initial velocity 'u', final velocity 'v' and acceleration 'a', find the distance travelled.

1 month ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

1 month ago