Risolto


Make a vector of prime numbers
Input(n) - length of vector with prime numbers Output(v) - vector of prime numbers Example: * n=1; v=2 * n=3; v=[2 3 5...

12 mesi fa

Risolto


Largest Twin Primes
<http://en.wikipedia.org/wiki/Twin_prime Twin primes> are primes p1, p2 = p1 + 2 such that both p1 and p2 are prime numbers. Giv...

12 mesi 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 co...

12 mesi fa

Risolto


Find nearest prime number less than input number
Find nearest prime number less than input number. For example: if the input number is 125, then the nearest prime number whi...

12 mesi fa

Risolto


Sophie Germain prime
In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...

12 mesi fa

Risolto


factorial_calc(n)
Write a MATLAB function called factorial_calc(n) that takes a positive integer n as input and calculates the factorial of n. The...

12 mesi fa

Problema


factorial_calc(n)
Write a MATLAB function called factorial_calc(n) that takes a positive integer n as input and calculates the factorial of n. The...

12 mesi fa | 0 | 17 risolutori

Risolto


Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x? <<https://i.imgur.com/jlZDHhq.png>> ...

12 mesi fa

Risolto


Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...

12 mesi fa

Risolto


Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<https://imgur.com/x6hT6mm.png>> ...

12 mesi fa

Risolto


Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<https://i.imgur.com/jlZDHhq.png>> Image courtesy of <http://up...

12 mesi fa

Risolto


Find the nearest prime
Given a positive integer 'n', the task is to find a prime number greater than or equal to 'n'. Example 1 If given 'n' is ...

12 mesi fa

Risolto


Find max prime number
Given integer number n. Find the max prime number (mpn) that smaller than or equal to n. Example: n = 10 --> mpn = 7

12 mesi fa

Risolto


Find out sum of prime number till given number
Find out sum of prime number till given number Example, if number is 10, then answer must be 17.

12 mesi fa

Risolto


Primes Faster for Large N
This Challenge is to improve the "primes" function for speed. This may be accomplished by fixing memory usage. The Matlab fun...

12 mesi fa

Risolto


Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the second...

12 mesi fa

Risolto


Draw a 'Z'.
Given _n_ as input, generate a n-by-n matrix like 'Z' by _0_ and _1_ . Example: n=5 ans= [1 1 1 1 1 0 0 0 1 ...

12 mesi fa

Risolto


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

12 mesi fa

Risolto


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

12 mesi fa

Risolto


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

12 mesi fa

Risolto


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

12 mesi fa

Risolto


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

12 mesi fa

Risolto


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

12 mesi fa

Risolto


Resistance in a circuit
Two resistors with values of 6.0 ohms and 12 ohms are connected in parallel. This combination is connected in series with a 4 o...

12 mesi fa

Risolto


Voltage in a lamp
A lamp is measured to have a resistance of R ohms when it operates at a power of P Watts. What is the voltage (in volts) being a...

12 mesi fa

Risolto


Resistance of a robot
What is the resistance of an industrial robot that draws P watts of power when connected to a power supply delivering V volts? R...

12 mesi fa

Risolto


Basic Mathematics 6
A High School is trying to build their robot to be able to reach the hanging object which is H inches from the ground. Their ro...

12 mesi fa

Risolto


Basic Mathematics 5
The total area of all four equal sections of the game field is N ft². Each section has a rectangle of dimensions X ft x Y ft re...

12 mesi fa

Risolto


Basic Mathematics 4
Team #1 is in first place but only one point higher than Team #2. The sum of their two scores is N. What are each team’s scores...

12 mesi fa

Risolto


Basic Mathematics 2
If a 4’ x 8’ sheet of ½” plywood weighs W lbs and you cut an L” x L” robot base from this material, approximately how much weigh...

12 mesi fa

Carica altro