A résolu


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

25 jours il y a

A résolu


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

25 jours il y a

A résolu


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

25 jours il y a

A résolu


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

25 jours il y a

A résolu


Number Puzzle - 115

25 jours il y a

A résolu


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

25 jours il y a

A résolu


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

25 jours il y a

A résolu


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

25 jours il y a

A résolu


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

25 jours il y a

A résolu


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

25 jours il y a

A résolu


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

25 jours il y a

A résolu


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

25 jours il y a

A résolu


Convert any case sentence to Title Case

25 jours il y a

A résolu


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

25 jours il y a

A résolu


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

25 jours il y a

A résolu


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

25 jours il y a

A résolu


Energy Conversion 1

25 jours il y a

A résolu


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

25 jours il y a

A résolu


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

25 jours il y a

A résolu


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

25 jours il y a

A résolu


Find Logic 15

25 jours il y a

A résolu


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

25 jours il y a

A résolu


Draw a '7' in a zero matrix!

25 jours il y a

A résolu


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

25 jours il y a

A résolu


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

25 jours il y a

A résolu


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

25 jours il y a

A résolu


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

25 jours il y a

A résolu


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

25 jours il y a