Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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.

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Cargar más