Gelöst


prime to each other
Given two integers n1, n2 greater than 1, find out if they are prime to each other.

mehr als 10 Jahre vor

Gelöst


Find elements of set A those are not in set B
Given two sets of data A and B. Find elements of A those are not in set B. ...

mehr als 10 Jahre vor

Gelöst


FInd an Area of a Polygon
Consider 2-D geometry and assume that the points are given in form of rows of a matrix. Find an area of polygon enclosed by the ...

mehr als 10 Jahre vor

Gelöst


How long does it take to run a bath?
Given the *volume flow rate* (volume/time) of a faucet and the *volume* of a bath tub, find the amount of time it takes to fill ...

mehr als 10 Jahre vor

Gelöst


Why the heck are they blinking!?!?
Merry Christmas everyone! Sadly, the lights you've had on your tree for so many years burned out, and it's time to get a new se...

mehr als 10 Jahre vor

Problem


Why the heck are they blinking!?!?
Merry Christmas everyone! Sadly, the lights you've had on your tree for so many years burned out, and it's time to get a new se...

mehr als 10 Jahre vor | 2 | 40 Lösungsvorschläge

Gelöst


sparse_matrix
You convert a vector to a sparse matrix. for example *x* =[1 2 3]; output will be *y* = [1 0 0 ...

mehr als 10 Jahre vor

Gelöst


Determine the full width at half max
Determine the full width at half max of a curve. The full width at half maximum (FWHM) is a parameter which is used for desc...

mehr als 10 Jahre vor

Gelöst


Replace secondary diagonal elements of a square array
Replace all the secondary diagonal elements of the square array A with the number n Example: A=[1 2 3; 4 5 6; 7 8 ...

mehr als 10 Jahre vor

Gelöst


2048 Next Move
Given a board in the game 2048 (see the game here: <http://gabrielecirulli.github.io/2048/ 2048>) and a direction ('up','down','...

mehr als 10 Jahre vor

Gelöst


Matrix of almost all zeros, except for main diagonal
Write a program to input an integer n and build a n-by-n matrix with the numbers 1,2,...,n on the main diagonal and zeros elsewh...

mehr als 10 Jahre vor

Gelöst


Polynomial Evaluation
Create a routine that takes a list of coefficients of a polynomial in order of increasing powers of x; together with a value of ...

mehr als 10 Jahre vor

Gelöst


Distance a ball travels after throwing vertically
Calculate the total distance *'d'* (in meters) a ball would travel after *'s'* seconds and starting velocity of *'v'* (in m/s). ...

mehr als 10 Jahre vor

Gelöst


UICBioE240 2.8
Convert x number of hours into seconds.

mehr als 10 Jahre vor

Gelöst


UICBioE240 2.2
Make a 3x4 matrix that contains all ones.

mehr als 10 Jahre vor

Gelöst


What's the missing interior angle?
I'm talking about polygons... The sum of the interior angles of a triangle is 180 degrees. The sum of the interior angles of a...

mehr als 10 Jahre vor

Gelöst


For a given linear index as input for n sized square matrix, find corresponding row and column.
If input is 1, the row and column will be 1 and 1 respectively.

mehr als 10 Jahre vor

Gelöst


Can you reshape the matrix?
Given a matrix A, is it possible to reshape it into another matrix with the given number of rows?

mehr als 10 Jahre vor

Gelöst


Get all corner elements from a matrix where dimension of matrix is always equal to or greater than 2.
if a given matrix a = [1 2 3;4 5 6]; so answer is going to be [1 3;4 6]

mehr als 10 Jahre vor

Gelöst


Longest Collatz Sequence
Inspired by Projet Euler n°14. The Collatz iterative sequence (See Cody problem n° 2103 and 211) is defined for the set of po...

mehr als 10 Jahre vor

Gelöst


longest sequence of nans
In an array return the length of longest sequence of nans for each column. x = [ 2 3 1 2 5 6; nan nan 5 n...

mehr als 10 Jahre vor

Gelöst


If you prick us, do we not bleed?
While doing some quick sewing to fix up your child's Halloween costume, you accidentally jab your finger with the needle. Refle...

mehr als 10 Jahre vor

Problem


If you prick us, do we not bleed?
While doing some quick sewing to fix up your child's Halloween costume, you accidentally jab your finger with the needle. Refle...

mehr als 10 Jahre vor | 1 | 27 Lösungsvorschläge

Gelöst


Place numbers
Given two input first input is a matrix which consist of the index numbers of the second input vector. You place the second inpu...

mehr als 10 Jahre vor

Gelöst


Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

mehr als 10 Jahre vor

Gelöst


sort matrix
Given a matrix, sort it for each column, but cannot change the element of each row. for example input = [1 3; 2 4;1 5;3 6]; ...

mehr als 10 Jahre vor

Gelöst


replace nan values iteratively.
replace nan values with the average of two neighbour non-nan value iteratively as follow; x = [2; 4; 6; nan; nan; nan; 10]; ...

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


the number of inputs
Find the number of the inputs of the function. example y = theinputnumber(x,k); function called theinputnumber has 2 in...

mehr als 10 Jahre vor

Gelöst


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

mehr als 10 Jahre vor

Mehr laden