Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

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

etwa ein Jahr vor | 0 | 1 Lösungsvorschlag

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

etwa ein Jahr vor | 0 | 0 Lösungsvorschläge

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

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

etwa ein Jahr vor | 1 | 1 Lösungsvorschlag

Gelöst


multiply by 12
multiply x by 12

etwa ein Jahr vor

Gelöst


multiply by 5
multiply x by 5

etwa ein Jahr vor

Gelöst


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)

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

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

etwa ein Jahr vor | 0 | 4 Lösungsvorschläge

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

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

etwa ein Jahr vor | 0 | 4 Lösungsvorschläge

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Gelöst


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

etwa ein Jahr vor

Mehr laden