Gelöst


Throwing Dice - Will You Be Eaten By The Dragon?
You and a dragon have agreed to let dice rolls determine whether it eats you or not. The dragon will roll a single die, of x si...

etwa ein Monat vor

Gelöst


Make a Plot with Functions
Make a plot and test

etwa ein Monat vor

Gelöst


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.

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Input...

etwa ein Monat vor

Gelöst


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

etwa ein Monat vor

Gelöst


Roll the Dice!
Description Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. Example [x1,x2] = rollDice(...

etwa ein Monat vor

Gelöst


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

etwa ein Monat vor

Gelöst


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

etwa ein Monat vor

Gelöst


Pi Estimate 1
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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.

etwa ein Monat vor

Gelöst


Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.

etwa ein Monat vor

Gelöst


Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

etwa ein Monat vor

Gelöst


radius of a spherical planet
You just measured its surface area, that is the input.

etwa ein Monat vor

Gelöst


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

etwa ein Monat vor

Gelöst


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

etwa ein Monat vor

Gelöst


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

etwa ein Monat vor

Gelöst


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not to use d...

etwa ein Monat vor

Gelöst


Inner product of two vectors
Find the inner product of two vectors.

etwa ein Monat vor

Gelöst


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

etwa ein Monat vor

Gelöst


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

etwa ein Monat vor

Gelöst


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

etwa ein Monat vor

Gelöst


Create a vector
Create a vector from 0 to n by intervals of 2.

etwa ein Monat vor

Gelöst


Find max
Find the maximum value of a given vector or matrix.

etwa ein Monat 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 rating at which yo...

etwa ein Monat 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 inch = 2...

etwa ein Monat vor

Gelöst


Find the Oldest Person in a Room
Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

etwa ein Monat vor

Gelöst


Total energy

etwa ein Monat vor

Gelöst


Kinetic energy calculation

etwa ein Monat vor

Mehr laden