Gelöst


Vandermonde Matrix
Create the Vandermonde Matrix of the given vector. The matrix consists of columns as powers of the vector, so the first column i...

etwa 4 Jahre vor

Gelöst


remove numbers from a string
check the given string for any numbers.in case one is found,remove it.but the two portions should be separated. if more than one...

etwa 4 Jahre vor

Gelöst


Compute the Sequence of the Day
A sequence starts with 1 and 2, and each subsequent term is the sum of the digits of the product of the previous two terms. As a...

etwa 4 Jahre vor

Gelöst


Reference Index Number
Given a reference set R of elements (each unique but identical in type), and a list V of elements drawn from the set R, possibly...

etwa 4 Jahre vor

Gelöst


How many unique Pythagorean triples?
For a given integer |n|, return all <https://en.wikipedia.org/wiki/Pythagorean_triple Pythagorean triples> that inlude numbers s...

etwa 4 Jahre vor

Gelöst


Find the slope of a line that passes through two vectors
Given two vectors p1 and p2, return the slope of a line that passes through p1 and p2. Examples: Input [p1,p2] = deal([0,1],[...

etwa 4 Jahre vor

Gelöst


Prime Letters = Removing
Given a string, remove all the letters which in ASCII Code are prime numbers. For Example: s1 = 'Determine which array e...

etwa 4 Jahre vor

Gelöst


Easy Sequences 34: Modified Pascal's Triangle
Consider the integer triangle below: It follows the same ...

etwa 4 Jahre vor

Gelöst


Powers Of
Fill the vector with powers of 2, so that vector(1) is 2^1, vector(2) is 2^2, etc. Stop with vector(10). Complete the function ...

etwa 4 Jahre vor

Gelöst


Find the next square number
Given one or more integers n, find the next integer that is a square, for each of them. Example 1: n = 1; out = 4; ...

etwa 4 Jahre vor

Gelöst


Polynomial division
Divide a polynomial u by polynomial v and return the quotients only. Example: u = x^4+3*x^3+5*x+3 v = x^2+1 Answer: ...

etwa 4 Jahre vor

Gelöst


Polygonal numbers
The task of <http://www.mathworks.co.uk/matlabcentral/cody/problems/5 Problem 5> is to calculate triangular numbers. By playing ...

etwa 4 Jahre vor

Gelöst


Dice face matrix!
This is dice simulator, but instead of making a random die number, you will receive an "pre-rolled" number in and spit out a mat...

etwa 4 Jahre vor

Gelöst


Period of a pendulum

etwa 4 Jahre vor

Gelöst


Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

etwa 4 Jahre vor

Gelöst


Polygon division
Given the number of vertices (or sides), n, of a planar convex polygon, return the number of ways, w, in which you can divide th...

etwa 4 Jahre vor

Gelöst


Given a number N, find the smallest prime P>N
Given a number N, find the smallest prime P greater than N. For example: If N=10 then P=11. If N=13 then P=17.

etwa 4 Jahre vor

Gelöst


Red Cross ❌

etwa 4 Jahre vor

Gelöst


step function

etwa 4 Jahre vor

Gelöst


Sum Sum Sum!
Calculate the sum of the natural numbers from 1 to n

etwa 4 Jahre vor

Gelöst


Sort rows of a matrix
Sort rows of matrix A in an ascending order according to the last column Example input: A = [1 2 3;7 8 9;4 5 6]; Exam...

etwa 4 Jahre vor

Gelöst


first element of matrix
find the first elements of a column matrix

etwa 4 Jahre vor

Gelöst


Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

etwa 4 Jahre vor

Gelöst


Write a code that will follow the equation y = x * (x + x) * x.
If x = 5, y = 5 * (5+5) * 5 = 250

etwa 4 Jahre vor

Gelöst


multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y. Examples: Input x = 2 Output y is ...

etwa 4 Jahre vor

Gelöst


Find the relation
Take x as input and y as output. If x=1 y=3 If x=2 y=14 If x=3 y=39 If x=4 y=84 Based on this relation find giv...

etwa 4 Jahre vor

Gelöst


Find the maximum two numbers of every column of a matrix
Find the maximum two numbers of every column of a matrix. Example: If we input a matrix A = [ 1 2 4 6 0 3 ...

etwa 4 Jahre vor

Gelöst


Change the sign of even index entries of the reversed vector
change the signs of the even index entries of the reversed vector example 1 vec = [4 -1 -2 9] ans = [9 2 -1 -4] example2...

etwa 4 Jahre vor

Gelöst


Combinations without using nchoosek
You have to generate a matrix with all possible combinations of n elements *taken 2* at a time, *without using nchoosek(1:n,2)* ...

etwa 4 Jahre vor

Gelöst


The Tower of Hanoi
In the <http://en.wikipedia.org/wiki/Tower_of_Hanoi Tower of Hanoi problem> with 3 rods (1, 2 & 3), the goal is to move a tower ...

etwa 4 Jahre vor

Mehr laden