Gelöst


Divisible by n, Composite Divisors
Pursuant to <http://www.mathworks.com/matlabcentral/cody/problems/42453-divisible-by-n-prime-vs-composite-divisors Divisible by ...

mehr als ein Jahr vor

Gelöst


Divisible by n, Truncated-number Divisors
Some divisors only require a few numbers at the end of the number in question to determine divisibility, no matter how long. Exa...

mehr als ein Jahr vor

Gelöst


Leader
An element of a list is called a "leader" if every element to its right (and not just the one immediately to its right) is stric...

mehr als ein Jahr vor

Gelöst


That's some divisor you've got there...
Given a positive integer x, calculate the sum of all of the divisors of the number. Please include the number itself in your fi...

mehr als ein Jahr vor

Gelöst


Repeat middle rows and columns of an array
Given an MxN numeric array (A), return an array (B) in which the middle rows and columns have each been repeated once. It may be...

mehr als ein Jahr vor

Gelöst


Component area
Find the area of the component below, all measurements are in mm <<https://image.ibb.co/hocruF/Component.png>>

mehr als ein Jahr vor

Gelöst


Euclidean inter-point distance matrix
The Euclidean distance between two points in a p-dimensional space is a really common thing to compute in the field of computati...

mehr als ein Jahr vor

Gelöst


Extract the Acrostic Message
An acrostic cipher is a way of embedding one message within another by taking the first (or last) word of each line. Given a str...

mehr als ein Jahr vor

Gelöst


Get a Fibonacci number's index.
*N.B.* For the purpose of this exercise, the first Fibonacci number is 1, and the second is 2; that is, |fib(1) = 1| and |fib(2)...

mehr als ein Jahr vor

Gelöst


Trickier Timing
You solution should return control to main program only when the current time ends in either a 5 or 0 (e.g. the current seconds ...

mehr als ein Jahr vor

Gelöst


Tricky timing
Write a function that takes between 0.5 seconds and 0.6 seconds to run.

mehr als ein Jahr vor

Gelöst


Back to basics 17 - white space
Covering some basic topics I haven't seen elsewhere on Cody. Remove the trailing white spaces from the input variable

mehr als ein Jahr vor

Gelöst


Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

mehr als ein Jahr vor

Gelöst


Assignment Problem
Given a matrix where row i corresponds to person i, and column j corresponds to task j and cell (i,j) corresponds to the time ta...

mehr als ein Jahr vor

Gelöst


Factorizing a number into a given number of factors
Given a positive integer, n, and another positive integer, b, return a matrix, M, of width b, with the following properties: (a)...

mehr als ein Jahr vor

Gelöst


Find maximum value of a curve
Two vectors shall be already defined: - Input vector x (e.g. x = 0:1:10) - Result vector y (e.g. y = sin(x)) Create a n...

mehr als ein Jahr vor

Gelöst


The last non-zero digit of a factorial
For given positive integer n, what is the last non-zero digit of n!? Example: factorial(11) = 39916800 Last non-zero d...

mehr als ein Jahr vor

Gelöst


Hofstadter G sequence
The Hofstadter G sequence is defined as follows: The first elements of the sequence are 0, 1, 1, 2, 3, 3, 4, 4, 5, 6. Write ...

mehr als ein Jahr vor

Gelöst


Hofstadter Female and Male sequences
The Hofstadter Female (F) and Male (M) sequences are defined as follows Write a function to compute for a given n. See http...

mehr als ein Jahr vor

Gelöst


Hofstadter H sequence
The Hofstadter H sequence is defined as follows: The first elements of the sequence are 0, 1, 1, 2, 3, 4, 4, 5, 5, 6. Write ...

mehr als ein Jahr vor

Gelöst


Hofstadter Q sequence
The Hofstadter Q sequence is defined as follows: The first elements of the sequence are 1, 1, 2, 3, 3, 4, 5, 5, 6, 6. Write ...

mehr als ein Jahr vor

Gelöst


Draw a Diamond shape in ones Matrix with '0' s
Input will be odd numbers.The task is to make a Diamond shape in a ones matrix with '0's where the matrix will be a square matri...

mehr als ein Jahr vor

Gelöst


Calculate the peak value of square wave
Given the peak value of sine wave, calculate corresponding peak value of square wave, if both have same RMS voltage.

mehr als ein Jahr vor

Gelöst


Calculate the integral of the polynomial
for e.g. in = [3 2 1] out = [1 1 1 0]

mehr als ein Jahr vor

Gelöst


Return the middle element of an NxN square matrix where N is odd
Let's say you are given an NxN square matrix where N is always going to be an odd number: x = [ 1 2 3 4 5 6 7 8 ...

mehr als ein Jahr vor

Gelöst


The Ulam Matrix
The Ulam spiral is simple to describe. On a gridded piece of paper, write down the number 1. Then write successive integers as y...

mehr als ein Jahr vor

Gelöst


Sum of diagonals
Compute the sum of diagonal elements of a square matrix and store the larger sum to s. Eg : a = [1 2 3; 2 3 4; 4 5 10] ...

mehr als ein Jahr vor

Mehr laden