Gelöst


Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

mehr als 2 Jahre vor

Gelöst


Sums of Distinct Powers
You will be given three numbers: base, nstart, and nend. Write a MATLAB script that will compute the sum of a sequence of both ...

mehr als 2 Jahre vor

Gelöst


Replace values out of an interval with the lower or upper values
For a vector or matrix X and an interval [n1,n2], the function replace every element of x inferior to n1 by n1, and every elemen...

mehr als 2 Jahre vor

Gelöst


Convert decimal to binary and then generate the minimum binary it can with jumbling
input is 10 --> 1010 output should be 3 --> 0011 input 23 --> 10111 output should be 15 --> 01111

mehr als 2 Jahre vor

Gelöst


Binary Inversion
Given the unsigned 8-bit integer x, return the number y which is the binary inversion of x. For example if x is 5, y should b...

mehr als 2 Jahre vor

Gelöst


Test if two numbers have the same digits
Given two integers _x1_ and _x2_, return |true| if the numbers written with no leading zeros contain the same digits. That is, t...

mehr als 2 Jahre vor

Gelöst


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

mehr als 2 Jahre vor

Gelöst


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

mehr als 2 Jahre vor

Gelöst


Find the gcm of n given values
Create a function that given n integer values greater than zero, finds the two numbers with the greatest common divisor and retu...

mehr als 2 Jahre vor

Gelöst


Convert integer to base26 using letters
Write a function that converts a decimal integer to base26 using the letters of the english alphabet, i.e. 0->'a', 1->'b', 2->'c...

mehr als 2 Jahre vor

Gelöst


The Tower of Hanoi
In the <http://en.wikipedia.org/wiki/Tower_of_Hanoi Tower of Hanoi problem> with 3 rods (1, 2 & 3), the goal is to move a tower ...

mehr als 2 Jahre vor

Gelöst


Find the Best Hotels
Given three input variables: * |hotels| - a list of hotel names * |ratings| - their ratings in a city * |cutoff| - the rat...

mehr als 2 Jahre vor

Gelöst


Calculate BMI
Given a matrix |hw| (height and weight) with two columns, calculate BMI using these formulas: * 1 kilogram = 2.2 pounds * 1 ...

mehr als 2 Jahre vor

Gelöst


Plot Damped Sinusoid
Given two vectors |t| and |y|, make a plot containing a blue ( |b| ) dashed ( |--| ) line of |y| versus |t|. Mark the minimum...

mehr als 2 Jahre vor

Gelöst


Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as |y = A.&#8519;^(-&lambda;t)*cos(2πft)| where |A|, |&lambda;|, and |f| ...

mehr als 2 Jahre vor

Gelöst


Solve a System of Linear Equations
Example: If a system of linear equations in x₁ and x₂ is: 2x₁ + x₂ = 2 x₁ - 4 x₂ = 3 Then the coefficient matrix (A) is: 2 ...

mehr als 2 Jahre vor

Gelöst


Goldbach's marginal conjecture - Write integer as sum of three primes
Goldbach's strong conjecture states that every even integer greater than 2 can be expressed as the sum of two primes. For exampl...

mehr als 2 Jahre vor

Gelöst


Find two triangular numbers whose sum is input.
Find two triangular numbers whose sum is _input_. Note: The difference beetween the triangular numbers should be minimum.

mehr als 2 Jahre vor

Gelöst


I'm going to enjoy watching you calculate, Mr Anderson
Smith numbers are numbers such that if you add up all of the digits in the number, that sum equals the sum of all of the digits ...

mehr als 2 Jahre vor

Gelöst


How brilliant are you?
A Brilliant number is defined as a number with two prime factors, both of which have the same number of digits. Some examples: ...

mehr als 2 Jahre vor

Gelöst


Polar Form Complex Number Entry
Write a function that takes the magnitude and angle(in degrees) of a complex number and returns a complex variable. Positive ang...

mehr als 2 Jahre vor

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 2 Jahre vor

Gelöst


It's going down. We're finding simbers!
This problem is inspired by Project Euler 520: Simbers. "We define a simber to be a positive integer in which any odd digit, ...

mehr als 2 Jahre vor

Gelöst


Amicable numbers
Test whether two numbers are <https://en.wikipedia.org/wiki/Amicable_numbers amicable>, meaning that the sum of the proper divis...

mehr als 2 Jahre vor

Gelöst


Consecutive Powers
Return 2 numbers and 2 powers such that their difference is 1 A 4 element row vector is expected: x where x(1)^x(2) - x(...

mehr als 2 Jahre vor

Gelöst


calculate PI without using pi function
There are many methods to get the pi(Ratio of circumference to diameter). You should get pi without using the pi function in M...

mehr als 2 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 2 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 2 Jahre vor

Gelöst


Dudeney Numbers: Numbers which are the cube of their decimal sum
From Wikipedia: _A Dudeney number is a positive integer that is a perfect cube such that the sum of its decimal digits is equa...

mehr als 2 Jahre vor

Gelöst


Recurring Cycle Length (Inspired by Project Euler Problem 26)
Preface: This problem is inspired by <http://projecteuler.net/problem=26 Project Euler Problem 26> and uses text from that quest...

mehr als 2 Jahre vor

Mehr laden