PhD student in Mechanical Engineering, with an interest in robotics

Solved

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

oltre 2 anni ago

Solved

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

oltre 2 anni ago

Solved

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

oltre 2 anni ago

Solved

"Cody" * 5 == "CodyCodyCodyCodyCody"

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

oltre 2 anni ago

Solved

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

oltre 2 anni ago

Solved

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

oltre 2 anni ago

Solved

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

oltre 2 anni ago

Solved

How to subtract?

*± ± ± ± ± ± ± ± ± ± ±* * Imagine you need to subtract one...

oltre 2 anni ago

Solved

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

oltre 2 anni ago

Solved

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

oltre 2 anni ago

Answered

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

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

oltre 3 anni ago | 0

Solved

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

oltre 3 anni ago

Solved

Character variable: Compass direction

* Assign compassDirection with sensorReading's value. Both are character variables.

oltre 3 anni ago

Solved

Arithmetic array operations

* Add x to each element of array temperatureReadings.

oltre 3 anni ago

Solved

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

oltre 3 anni ago

Solved

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

oltre 3 anni ago

Solved

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

oltre 3 anni ago

Solved

Function definition: Double down.

* Complete the DoubleDown function to return twice the initialValue.

oltre 3 anni ago

Solved

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

oltre 3 anni ago

Solved

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

oltre 3 anni ago

Solved

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

oltre 3 anni ago

Solved

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

oltre 3 anni ago

Solved

Determine Whether an array is empty

Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

oltre 3 anni ago

Solved

Arrange vector in ascending order

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

oltre 3 anni ago

Solved

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

oltre 3 anni ago

Solved

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

oltre 3 anni ago

Solved

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

oltre 3 anni ago

Solved

Construct an array

* Construct an row array named observedValues with elements sensorReading1, sensorReading2, and sensorReading3.

oltre 3 anni ago

Solved

Project Euler: Problem 6, Natural numbers, squares and sums.

The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

oltre 3 anni ago