Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Problema


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

circa un anno fa | 0 | 1 risolutore

Problema


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

circa un anno fa | 0 | 0 risolutori

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Problema


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

circa un anno fa | 1 | 1 risolutore

Risolto


multiply by 12
multiply x by 12

circa un anno fa

Risolto


multiply by 5
multiply x by 5

circa un anno fa

Risolto


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)

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Problema


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

circa un anno fa | 0 | 4 risolutori

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Problema


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

circa un anno fa | 0 | 4 risolutori

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Carica altro