Gelöst


inner product of two vectors
inner product of two vectors

mehr als 8 Jahre vor

Gelöst


Create a patchwork matrix
This function will assemble a large matrix out of a number of smaller ones m1, m2, etc., according to a pattern P. If P is 3x5,...

mehr als 8 Jahre vor

Gelöst


Symmetric matrix
You must create a n-by-n *symmetric* matrix such that A(row,col) = row/col for col >= row. Example if n =3 : output is : ...

mehr als 8 Jahre vor

Gelöst


Throw common elements of two vector arrays in sorted manner
Throw common elements as output in sorted manner (acending order) of two given input vector arrays

mehr als 8 Jahre vor

Gelöst


Approximation of Pi (vector inputs)
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

mehr als 8 Jahre vor

Gelöst


Mersenne Primes vs. All Primes
A Mersenne prime (M) is a prime number of the form M = 2^p - 1, where p is another prime number. <https://www.mathworks.com/matl...

mehr als 8 Jahre vor

Gelöst


Sum of series VII
What is the sum of the following sequence: Σ(km^k)/(k+m)! for k=1...n for different n and m?

mehr als 8 Jahre vor

Gelöst


Sum of series VI
What is the sum of the following sequence: Σk⋅k! for k=1...n for different n?

mehr als 8 Jahre vor

Gelöst


geometric progression
I've modified my <http://uk.mathworks.com/matlabcentral/cody/problems/2800-arithmetic-progression previous program> so that it n...

mehr als 8 Jahre vor

Gelöst


arithmetic progression
I've written a program to generate the first few terms of <https://en.wikipedia.org/wiki/Arithmetic_progression arithmetic progr...

mehr als 8 Jahre vor

Gelöst


Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation, * F_n = F_(n-1) + F_(n-2) * where F_0 = 0 and F_1 ...

mehr als 8 Jahre vor

Gelöst


Sum of series V
What is the sum of the following sequence: Σk(k+1) for k=1...n for different n?

mehr als 8 Jahre vor

Gelöst


Sum of series II
What is the sum of the following sequence: Σ(2k-1)^2 for k=1...n for different n?

mehr als 8 Jahre vor

Gelöst


Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

mehr als 8 Jahre vor

Gelöst


Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

fast 9 Jahre vor

Gelöst


Make an awesome ramp for a tiny motorcycle stuntman
Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 3 6 9 11 0; 6 9 ...

fast 9 Jahre vor

Gelöst


Test for balanced parentheses
Given the input inStr, give the boolean output out indicating whether all the parentheses are balanced. Examples: * If ...

fast 9 Jahre vor

Gelöst


Split a string into chunks of specified length
Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

fast 9 Jahre vor

Gelöst


Add more zeros
Find code that adds one 0 to each sequence of 0 in a string (composed with only 0 or 1). For example: '1010' -> '100100' ...

fast 9 Jahre vor

Gelöst


Find the position of last minimum value in an integer array with numbers
If x = [2 6 4 9 -10 3 1 5 -10] then the output should be 9, because last minimum value (-10) lies at the 9th position.

fast 9 Jahre vor

Gelöst


Vector LCM
* Find Least Common Multiple of a given vector. * Need general solution as the test suite will be expanded. * Function Templa...

fast 9 Jahre vor

Gelöst


Vector of numbers divisible by 3
* Input(n) - any integer * Output(v) - vector with numbers divisible by 3(exept 0) starting from n to 0 Examples: * n=6...

fast 9 Jahre vor

Gelöst


Divisible by 9
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

fast 9 Jahre vor

Gelöst


Divisible by 3
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

fast 9 Jahre vor

Gelöst


Divisible by 2
This is the first problem in a set of "divisible by x" problems. You will be provided a number as a string and the function you ...

fast 9 Jahre vor

Gelöst


Divisible by 5
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

fast 9 Jahre vor

Gelöst


Divisible by 4
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

fast 9 Jahre vor

Gelöst


"Power matrix" of two vectors
Given two row vectors x,y of lengths m and n (respectively), create an m x n matrix whose i,j entry is x(i)^y(j).

fast 9 Jahre vor

Gelöst


Matrix with different incremental runs
Given a vector of positive integers a = [ 3 2 4 ]; create the matrix where the *i* th column contains the vector *1:a(i)...

fast 9 Jahre vor

Gelöst


Special matrix
Make a square matrix with this shape. For n=4 M = 1 1 0 0 1 0 1 0 0 1 0 ...

fast 9 Jahre vor

Mehr laden