Community Profile

# Giovanni Mottola

##### Last seen: Today
170 2016 年以降の合計貢献数

PhD student in Mechanical Engineering, with an interest in robotics

#### Giovanni Mottola's バッジ

Extra safe primes
Did you know that the number 5 is the first safe prime? A safe prime is a prime number that can be expressed as 2p+1, where p is...

2年以上 前

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

2年以上 前

5th Time's a Charm
Write a function that will return the input value. However, your function must fail the first four times, only functioning prope...

2年以上 前

"Cody" * 5 == "CodyCodyCodyCodyCody"
*Alice*: What? *"Cody" * 5 == "CodyCodyCodyCodyCody"*? You've gotta be kidding me! *Bob*: No, I am serious! Python supports...

2年以上 前

Pernicious Anniversary Problem
Since Cody is 5 years old, it's pernicious. A <http://rosettacode.org/wiki/Pernicious_numbers Pernicious number> is an integer w...

2年以上 前

Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.
Submit your answer to this problem a multiple of 5 seconds after the hour. Your answer is irrelevant; the only thing that matte...

2年以上 前

Number of Even Elements in Fibonacci Sequence
Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...

2年以上 前

How to subtract?
*&plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn* * Imagine you need to subtract one...

2年以上 前

The 5th Root
Write a function to find the 5th root of a number. It sounds easy, but the typical functions are not allowed (see the test su...

2年以上 前

Energy of a photon
Given the frequency F of a photon in giga hertz. Find energy E of this photon in giga electron volts. Assume h, Planck's ...

2年以上 前

How to remove 0 (for 'double' numerical type) or [] (for cell type) rows in a table ?
Starting point: tab = S_Bankname S_CommonEquityTierRatio_2013 S_Log_TotalAssets_2013 __________ ...

3年以上 前 | 0

Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

3年以上 前

Character variable: Compass direction
* Assign compassDirection with sensorReading's value. Both are character variables.

3年以上 前

Arithmetic array operations

3年以上 前

Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...

3年以上 前

Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

3年以上 前

Back to basics 1 - Saving
Covering some basic topics I haven't seen elsewhere on Cody. Given an input variable 'x', save it to disk in a file named 'co...

3年以上 前

Function definition: Double down.
* Complete the DoubleDown function to return twice the initialValue.

3年以上 前

Fahrenheit to Celsius using multiple statements
°C = (°F - 32) x 5/9 * Write a statement that assigns fractionalMultiplier with 5/9. * Write a second statement that assign...

3年以上 前

Plus x: A first program
_Solve this problem in Mathwork's online Cody system._ Write a statement that assigns y with 5 plus x. Ex: If input x = 2,...

3年以上 前

Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

3年以上 前

Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

3年以上 前

Logic variables
* Assign isAvailable with true.

3年以上 前

Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

3年以上 前

Arrange vector in ascending order
Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

3年以上 前

Integer indexing array: Weekend box office
The row array movieBoxOffice stores the amount of money a movie makes (in millions of \$) for the 7 days of a week, starting with...

3年以上 前

Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

3年以上 前

Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

3年以上 前

Construct an array