Gelöst


Euler–Mascheroni constant
Approximate the Euler-Mascheroni constant using the series representation gamma_n=\sum_{k=1}^{n} [1/k-ln(1+1/k)] Calculat...

mehr als 5 Jahre vor

Gelöst


birthday on same day of week
Say, Mr. X's birthday is on 20th July, 2014. It was Sunday. Determine the closest year when his birthday will again be on Sunday...

mehr als 5 Jahre vor

Gelöst


An n-sided regular polygon is drawn within a circle whose radius is 'r', what will be the area of the polygon?
area of a polygon is p*a/2. where, p is the perimeter and a is the apothem i.e. the normal distance from center to any of the ...

mehr als 5 Jahre vor

Gelöst


Calculate the volume of the cube.
Example n = 3; a = volume(n); a = 27

mehr als 5 Jahre vor

Gelöst


Subtract integers and add doubles
Create a function that subtracts a from b if a and b are integers and adds them if they are floats.

mehr als 5 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: * ...

mehr als 5 Jahre vor

Gelöst


Multiply Column
Given two input, one matrix and one scalar number For example A is a matrix given A = [ 1 2 2 5 2 5 2 3 4 6...

mehr als 5 Jahre vor

Gelöst


Guess
A random number between 1 and 10 is created for the variable y. Guess what its value is.

mehr als 5 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...

mehr als 5 Jahre vor

Gelöst


Distance walked 3D
suppose you go from x-y-z coordinates [3,4,2] to [0,0,2] to [0,1,2] to [1,1,2], to [1,1,20] then you walked 25 units of distance...

mehr als 5 Jahre vor

Gelöst


Pandigital number n°1 (Inspired by Project Euler 32)
A little warm-up to begin... An n-digit number is pandigital if it makes use of all the digits 1 to n exactly ONCE. For ex...

mehr als 5 Jahre vor

Gelöst


Factorions: Numbers that equal the sum of the factorials of their digits
From Wikipedia: _A factorion is a natural number that equals the sum of the factorials of its decimal digits_ For example: ...

mehr als 5 Jahre vor

Gelöst


Flag a convertible string
If a string is able to be entirely converted to an integer, return a "true" flag. Otherwise, return a false flag. For example: ...

mehr als 5 Jahre vor

Gelöst


The maximum sum of squares (testing)
Create a function file with an input maxval to determine the maximum number of terms for the series 1^2 + 2^2 + 3^2 + ... such t...

mehr als 5 Jahre vor

Gelöst


surface of parallelogram
Given 2 vectors of each 3 elements, determine the surface of the parallelogram which can be created from these 2 vectors.

mehr als 5 Jahre vor

Gelöst


Check if any duplicates in your data
Given an array x, return a number n equal to the largest number of repetitions in your data. For example: If x=[1 2 3 6 8 4 9]...

mehr als 5 Jahre vor

Gelöst


Just another sum (JAS)
*Task:* Write a function that takes a vector X and returns the alternating sum of X: X(1)-X(2)+X(3)-X(4)+... *Example...

mehr als 5 Jahre vor

Gelöst


how many of the entries are positive?
Given x= sin(linspace(0,10*pi,100)), how many of the entries are positive?

mehr als 5 Jahre vor

Gelöst


Matlab Basics - Assigning Variables
Assign different types of data to variables: integer, double, and strings Example: A is a double, for example 2.34 B is a...

mehr als 5 Jahre vor

Gelöst


Get the combinations
Consider p,q = 2 vectors of same or different length. Get a Output Array which has all the possible combinations of Elements o...

mehr als 5 Jahre vor

Gelöst


Return all matrix elements except elements on diagonal
Consider a given Matrix A=[a b c; d e f; g h i] then return a row vector T such that it contains all the El...

mehr als 5 Jahre vor

Gelöst


A quadrant matrix
Write a function called quadrants that takes as its input argument a scalar integer named n. The function returns Q, a 2n-by-2n ...

mehr als 5 Jahre vor

Gelöst


No Twins?
Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...

mehr als 5 Jahre vor

Gelöst


Volume of a Parallelepiped
Calculate the volume of a Parallelepiped given the vectors for three edges that meet at one vertex. A cube is a special case ...

mehr als 5 Jahre vor

Gelöst


Wrapping the Tower of Pisa
The famous artist Christo Vladimirov Javacheff, who likes pizza, wants to wrap the well-known Italian tower in paper. It is a ci...

mehr als 5 Jahre vor

Gelöst


Is this is a Tic Tac Toe X Win?
For the game of <https://en.wikipedia.org/wiki/Tic-tac-toe Tic Tac Toe> we will be storing the state of the game in a matrix M. ...

mehr als 5 Jahre vor

Gelöst


Make a Star Pyramid
Create a star pyramid. First line will have 1 star, second will have two stars and so on... a basic program which is easily done...

mehr als 5 Jahre vor

Gelöst


Getting the indices from a matrice
Getting the indices from a matrice. Inspired by Problem 645. Getting the indices from a vector by the great Doug Hull. Given a...

mehr als 5 Jahre vor

Gelöst


Zero Cross
Write a function that counts the number of times n a signal x changes sign. Examples x = [1 2 -3 -4 5 6 -7 8 -9 10 11] ...

mehr als 5 Jahre vor

Gelöst


Aquiles y la tortuga
Contaba Zenón en su famosa paradoja que un día Aquiles, el guerrero griego más veloz de la Hélade, se enfrentó a una pequeña tor...

mehr als 5 Jahre vor

Mehr laden