已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

问题


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

1 year 前 | 0 | 1 个解题者

问题


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

1 year 前 | 0 | 1 个解题者

已解决


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

1 year 前

已解决


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

1 year 前

问题


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

1 year 前 | 1 | 1 个解题者

已解决


multiply by 12
multiply x by 12

1 year 前

已解决


multiply by 5
multiply x by 5

1 year 前

已解决


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)

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

问题


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

1 year 前 | 0 | 4 个解题者

已解决


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 前

已解决


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 前

已解决


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 前

问题


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 前 | 0 | 4 个解题者

已解决


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 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


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 前

已解决


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 前

已解决


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 前

已解决


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 前

加载更多