解決済み


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

27日 前

解決済み


Make a Plot with Functions
Make a plot and test

27日 前

解決済み


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.

27日 前

解決済み


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

27日 前

解決済み


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

27日 前

解決済み


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]

27日 前

解決済み


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

27日 前

解決済み


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.

27日 前

解決済み


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

27日 前

解決済み


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

27日 前

解決済み


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

27日 前

解決済み


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.

27日 前

解決済み


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

27日 前

解決済み


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

27日 前

解決済み


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

27日 前

解決済み


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

約1ヶ月 前

解決済み


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

約1ヶ月 前

解決済み


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

約1ヶ月 前

解決済み


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

約1ヶ月 前

解決済み


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

約1ヶ月 前

解決済み


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

約1ヶ月 前

解決済み


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

約1ヶ月 前

解決済み


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

約1ヶ月 前

解決済み


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

約1ヶ月 前

解決済み


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

約1ヶ月 前

解決済み


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

約1ヶ月 前

解決済み


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

約1ヶ月 前

解決済み


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

約1ヶ月 前

解決済み


Total energy

約1ヶ月 前

解決済み


Kinetic energy calculation

約1ヶ月 前

さらに読み込む