Solved


Two functions (to be sure)
I want to compute the number of odd/even numbers in an array. But I want the results by two different functions. Example: ...

12 months ago

Solved


Concatenate a successive power matrix in a column matrix
Generate F = [M1 M^2 ... M^p] with M a matrix, without using for.

12 months ago

Solved


Usage of mkdir and copyfile
This Challenge is to copy a file into a new directory multiple levels below existing directory architecture. System appears ...

12 months ago

Solved


Negation and new variables
Inspired by Problem 1827 by Andrew Newell. Write a function that has the following property: (x~=y) neg3(x)=x; neg3...

12 months ago

Problem


Easy Sequences 108: Enclosing a Circle with Primitive Pythagorean Triangles
Pythagorean Triangle is a right triangle all sides of which are represented by integers. Examples are triangles with sides and ...

12 months ago | 0 | 1 solver

Problem


Easy Sequences 107: Minimized Circumcircle-Incircle Areas Ratio of Partial Pythagorean Triangles
We define a Partial Pythagorean Triangle (PPT) as a right triangle wherein the hypotenuse and at least one leg are integers. Thu...

12 months ago | 0 | 0 solvers

Solved


Recursion - Fun
Generate the first k terms in the sequence a(n) define recursively by a(n+1)=p*a(n)+(1+a(n)) with p=0.9 and a(1)=0.5 Te...

12 months ago

Solved


Who is using Cody?
Return your 'username' as char vector. Hint: no personal info are revealed, just use basic commands (not only Matlab).

12 months ago

Problem


Easy Sequences 106: Counting Pythagorean Triangles inside a Circle
Pythagorean Triangle is a right triangle all sides of which are represented by integers. Examples are triangles with sides and ...

12 months ago | 1 | 1 solver

Solved


multiply by 12
multiply x by 12

12 months ago

Solved


multiply by 5
multiply x by 5

12 months ago

Solved


raise x to the nth power
use basic math operators and a variable to solve the problem for a given variable n. (make sure "n" is the variable you use)

12 months ago

Solved


Find gradient of a numeric data which has same size as the existing vector.
**** Refer matlab documentation about finding gradient **** Convert the entire gradient vector to least integer form. (Probably...

12 months ago

Solved


Sequence Vectorization - II
This is the second part to the question - Sequence Vectorization - I Given an array of Natural numbers, N, return the sequence ...

12 months ago

Solved


Sequence Vectorization - I
Given a Natural number N, return the sequence - [1 1 2 1 2 3 1 2 3 4 ... 1 2 3 ... N-3 N-2 N-1 N] i.e. the horizontal concatenat...

12 months ago

Solved


Easy Sequences 105: One-line Code Challenge - IPv4 Address Validation
The Internet Protocol version 4 (IPv4) is the dominant protocol for routing devices over the internet. IPv4 addresses are usuall...

12 months ago

Problem


Easy Sequences 105: One-line Code Challenge -IPv4 Address Validation
The Internet Protocol version 4 (IPv4) is the dominant protocol for routing devices over the internet. IPv4 addresses are usuall...

12 months ago | 0 | 4 solvers

Solved


Easy Sequences 104: One-line Code Challenge - GCDs of Sum of Consecutive Cubes
For a natural number, n, the function CC(n) is defined as follows: In other words, CC(n) is the sum of cubes ...

1 year ago

Solved


Identify de Polignac numbers
The numbers 125 and 329 can be written as the sum of a prime and a power of 2. For example, , and . The numbers 127 and 331, whi...

1 year ago

Solved


Solve an ODE: draining tank
Write a function to compute the time to drain a cylindrical tank of diameter from an initial level to a level . The outflow oc...

1 year ago

Problem


Easy Sequences 104: One-line Code Challenge - GCDs of Sum of Consecutive Cubes
For a natural number, n, the function CC(n) is defined as follows: In other words, CC(n) is the sum of cubes ...

1 year ago | 0 | 4 solvers

Solved


distance to a straight line (2D) given any 2 distinct points on this straight line
Given 2 points P1,P2 on a straight line and a 3rd point, determine the distance of the 3rd point to the straight line. Your answ...

1 year ago

Solved


The prisoner
"We want information, information, information." "Who are you?" Input can be a string or a number (array).

1 year ago

Solved


Hardy-Ramanujan number
Find the first Hardy-Ramanujan number.

1 year ago

Solved


Funny problems
Generate the following vector: if n=1 then q=1; elseif n=2 then q=[2 2 1]; elseif n=3 then q=[3 3 3 2 2 1]; ... end

1 year ago

Solved


Find the repeating elements and repetitions of a row vector.
So let's say that x is a vector, for example, x = [4, 4, 5, 5, 5, 6, 7, 7,8, 8, 8, 8] Now we want to get the following two ve...

1 year ago

Solved


Convert vector of strings to lower triangular matrix
Given a non-empty vector vec of strings, please put its elements into the lower triangular half of a square matrix M column-wise...

1 year ago

Solved


Triangle of numbers
Create a matrix with the integers from 1 to |n| arranged in a triangular shape. Every row |i| of the matrix contains |i| inte...

1 year ago

Load more