Risolto

Duplicate a character

Duplicate a character 'n' times. Example 1: str='a' n=5 output='aaaaa' Example 2: str='*' n=3 output='***'

oltre 2 anni fa

Risolto

Number of vertices of a hypercube

Return the number of vertices of a n-dimensional hypercube.

oltre 2 anni fa

Risolto

Calculate compression ratio of engine

Calculate compression ratio of engine given compression volume of cylinder(Vc), piston stroke(s) and valve diameter(d)

oltre 2 anni fa

Risolto

Schwarzschild radius

Compute the Schwarzschild radius for objects of mass m (kg). Use c = 299,792.458 km/s and G = 6.6738*10^-11 N*(m/kg)^2. Your fun...

oltre 2 anni fa

Risolto

Easy Sequences 13: Average Speed of Spaceship

A certain alien spaceship is capable of traveling at extremely high velocities and is able to change speed instantaneously. The ...

oltre 2 anni fa

Risolto

Create initial basic feasible solution for transportation problems - North-West Corner Method

oltre 2 anni fa

Risolto

Differential equations I

Given a function handle |f| an initial condition |y0| and a final time |tf|, solve numerically the differential equation dy...

oltre 2 anni fa

Risolto

The Birthday Phenomenon

First off, leap years are not being considered for this. In fact the year that people are born shouldn't be taken into considera...

oltre 2 anni fa

Risolto

Monte-Carlo integration

Write a function that estimates a d-dimensional integral to at least 1% relative precision. Inputs: * d: positive integer....

oltre 2 anni fa

Risolto

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

oltre 2 anni fa

Risolto

Large Sum (inspired by Project Euler 13)

Your function will be provided an arbitrary number of numbers of arbitrary sizes as a cell array of strings. Some numbers will b...

oltre 2 anni fa

Risolto

Divisors for big integer

Inspired by Problem 1025 and Project Euler 12. Given n, return the number y of integers that divide N. For example, with ...

oltre 2 anni fa

Risolto

Highly divisible triangular number (inspired by Project Euler 12)

Triangular numbers can be calculated by the sum from 1 to n. For example, the first 10 triangular numbers are: 1, 3, 6, 10, ...

oltre 2 anni fa

Risolto

Project Euler: Problem 11, Largest product in a grid

What is the greatest product of _k_ adjacent numbers in the same direction (up, down, left, right, or diagonally) in a _n×n_ gri...

oltre 2 anni fa

Risolto

Sum of big primes without primes

Inspired by Project Euler n°10 (I am quite obviously a fan). With problem n°250 by Doug, you can find some global methods to ...

quasi 3 anni fa

Risolto

Sums of cubes and squares of sums

Given the positive integers 1:n, can you: 1. Compute twice the sum of the cubes of those numbers. 2. Subtract the square...

quasi 3 anni fa

Risolto

The Piggy Bank Problem

Given a cylindrical piggy bank with radius g and height y, return the bank's volume. [ g is first input argument.] Bonus though...

circa 3 anni fa

Risolto

Fraction of a fraction of a ...

One sort of brainteaser problem is a math problem wherein you are asked what the given fraction of a fraction of a ... number is...

oltre 3 anni fa

Risolto

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

oltre 3 anni fa

Risolto

Approximation of Pi

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

oltre 3 anni fa

Risolto

Given a square and a circle, please decide whether the square covers more area.

You know the side of a square and the diameter of a circle, please decide whether the square covers more area.

oltre 3 anni fa

Risolto

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

oltre 3 anni fa

Risolto

Pancakes for everyone!

Accordingly to the <http://nl.mathworks.com/matlabcentral/cody/problems/42460-the-cake-is-a-lie problem 42460>. All the children...

oltre 3 anni fa

Risolto

The cake is a lie...

You're hosting a birthday party with a large number of screaming children. Fortunately, you have a gigantic sheet cake in front...

oltre 3 anni fa

Risolto

Radiation Heat Transfer — View Factors (5)

View factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates bet...

oltre 3 anni fa

Risolto

Radiation Heat Transfer — View Factors (4)

View factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates bet...

oltre 3 anni fa

Risolto

Convex Hull Capture

Imagine four points in uv that form a square. uv = [ ... 0,0; 0,2; 2,2; 2,0]; Now we have two more po...

oltre 3 anni fa

Risolto

Find the sines of an isosceles triangle when given its area and height

Find the sines of an isosceles triangle when given its area and height. For example, when A=60 and h=5, the result is [0.3752...

oltre 3 anni fa

Risolto

solid of revolution

Given an real polynomial P and two real numbers a,b with 0<=a<=b. Calculate the volume of the solid of revolution made by rota...

oltre 3 anni fa