43 total contributions since 2017

Born in Shanghai, CN. Master of Finance major, interested in Fixed Income Analysis and Quantitive Financial Analyze. Hobby in MATLAB field are GUI, 3d graph.

Solved

MATLAB Counter

Write a function f = counter(x0,b) to construct a counter handle f that counts with an initial value x0 and a step size b. E...

7 mois ago

Solved

Octoberfest festival

A group of students decided to visit Octoberfest festival. First they ordered one beer, then after half-hour they taken one more...

7 mois ago

Solved

Spot the First Occurrence of 5

This problem series invites you to solve two simple problems related to the integer NUMBER FIVE, in order to celebrate <https://...

7 mois ago

Solved

A Simple Tide Gauge with MATLAB

*∿ ∿ ∿ ∿ ∿ ∿ ∿ ∿* You are standing in a few inches of sea water on a beach. You a...

7 mois ago

Solved

Is this is a Tic Tac Toe X Win?

For the game of <https://en.wikipedia.org/wiki/Tic-tac-toe Tic Tac Toe> we will be storing the state of the game in a matrix M. ...

7 mois ago

Solved

5 Prime Numbers

Your function will be given lower and upper integer bounds. Your task is to return a vector containing the first five prime numb...

7 mois ago

Solved

Find the nearest prime number

Happy 5th birthday, Cody! Since 5 is a prime number, let's have some fun looking for other prime numbers. Given a positive in...

7 mois ago

Solved

Circumscribed Pentagon?

Building off of <https://www.mathworks.com/matlabcentral/cody/problems/44368 Problem 44368>, your function will be provided with...

presque 2 ans ago

Solved

Hexagonal numbers on a spiral matrix

Put hexagonal numbers in a ( m x m ) spiral matrix and return the sum of its diagonal elements. Formula of hexagonal numbers ...

presque 2 ans ago

Solved

Cache me Outside

The test suite includes a simple recursive Fibonacci sequence generator, but it's terribly inefficient. One simple method for im...

presque 2 ans ago

Solved

Is this a valid Tic Tac Toe State?

For the game of <https://en.wikipedia.org/wiki/Tic-tac-toe Tic Tac Toe> we will be storing the state of the game in a matrix M. ...

presque 2 ans ago

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

presque 2 ans ago

Solved

Basic electricity in a dry situation

⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ &#...

presque 2 ans ago

Solved

Pentagonal Numbers

Your function will receive a lower and upper bound. It should return all pentagonal numbers within that inclusive range in ascen...

presque 2 ans 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...

presque 2 ans 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...

presque 2 ans ago

Solved

Energy of a photon

*⚛ ☢ ⚛ ☢ ⚛ ☢ ⚛* Given the frequency F of a photon in giga hertz. Find energy E of this...

presque 2 ans ago

Solved

How to subtract?

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

presque 2 ans ago

Solved

Recaman Sequence - III

I want to create a Recaman sequence where the nth number will be 1. So from which integer should I start the Recaman sequence? ...

presque 2 ans ago

Solved

Parse me a Lisp

*Description* In Lisp and its variants, function calls are done using parenthesis where the first item in the parenthesis is ...

presque 2 ans ago

Solved

Group-wise Euclidean distance

*Input*: * *x* —— An array of size *n-by-d*, where each row vector denotes a point in a d-dimensional space; * *g* —— A gro...

presque 2 ans ago

Solved

Digit concentration in Champernowne's constant

Consider the first 50 digits of Champernowne's constant 0.12345678910111213141516171819202122232425262728293... The...

presque 2 ans 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 ...

presque 2 ans ago

Solved

Tautology

Check if the given expression is always true. For example, the sentence '~(A & B) == (~A | ~B)' is always true. Chara...

presque 2 ans 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...

presque 2 ans ago

Solved

Pair Primes

Let's define pair primes as follow; * *For 2 digits numbers:* 11 and 17 are pair primes because both of them are 2 digits pri...

presque 2 ans ago

Solved

Acid and water

⚖ ⚖ ⚖ ⚖ ⚖ ⚖ ⚖ ⚖ Assume that there is a 100 liter tank. It is initially fi...

presque 2 ans ago

Solved

An asteroid and a spacecraft

🚀 Imagine a non-relativistic simple situation. Assume positions p0, p1, p2, and p3 are three dimensional Cartesian ...

presque 2 ans ago