Community Profile

photo

li haitao


Last seen: 8 días ago
1.263 total contributions since 2012

li haitao's Badges

  • Knowledgeable Level 1
  • First Answer
  • Community Group Solver
  • Introduction to MATLAB Master
  • Cody5 Easy Master
  • First Review
  • Divisible by x Master
  • Cody Challenge Master
  • Draw Letters
  • Project Euler I
  • Matrix Manipulation I Master
  • R2016b Feature Challenge Master
  • Creator
  • Speed Demon
  • Leader

View all

Contributions in
View by

Solved


Pattern Sum
Write a function which receives two single digit positive integers, (k and m) as parameters and calculates the total sum as: k...

8 días ago

Solved


Neither minima nor maxima
Input v is a vector. Return all the elements of v which are not a local minimum or maximum. Example: v = [1 2 3 4 5] Ou...

15 días ago

Solved


compress sequence into intervals
You're given a row vector of monotonically increasing integers most of which are consecutive. Find the upper and lower bounds of...

15 días ago

Solved


Rescale Scores
Each column (except last) of matrix |X| contains students' scores in a course assignment or a test. The last column has a weight...

4 meses ago

Solved


S-T-R-E-T-C-H I-T O-U-T
You will be given a row of numbers (x), and a single number (n). Your job is to write a script that will stretch out the row of...

11 meses ago

Solved


Mirror Image matrix across anti-diagonal
Given an input number x, create a mirror image matrix 'Y' across the anti-diagonal. For example, if x=3, Y = [1 2 3; ...

11 meses ago

Solved


Generalised Hamming Number
Inspired by Project Euler n°204 and Problem 1308 by James A generalised Hamming number of type n, has no prime factor larger ...

más de 1 año ago

Solved


Numbers with prime factors 2, 3 and 5.
Make a function which takes one positive integer n and returns a matrix with the numbers of the form (2^i)*(3^j)*(5^k) which are...

más de 1 año ago

Solved


Find vampire numbers
A <http://en.wikipedia.org/wiki/Vampire_number vampire number> is a number v that is the product of two numbers x and y such th...

más de 1 año ago

Solved


Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not coun...

más de 1 año ago

Solved


Average speed for the entire trip
The input is two speeds (for the trip and return trip) and output is average speed. Assume units are consistent, say miles per h...

casi 2 años ago

Solved


Determine if input is a Narcissistic number
<http://en.wikipedia.org/wiki/Narcissistic_number Narcissistic number> is a number that is the sum of its own digits each raised...

casi 2 años ago

Solved


Cube root of max value in a vector
Find the cube root of the maximum value in a vector

casi 2 años ago

Solved


Make an anonymous function that has variable output
Make a anonymous function that has variable output. f = @(x)... the following equation→equation(s) as followed has(ve) ...

casi 2 años ago

Solved


Testing Problem Creation
This is where MATLAB based question will be

casi 2 años ago

Solved


Number Power
Raise a number to itself.

casi 2 años ago

Solved


Path of least resistance
Find the length of the shortest path through the matrix from the top left to bottom right corner. You may move right, down, or d...

casi 2 años ago

Solved


Modified run-length companion vector
Given a vector x, return a vector that indicates the run length of any value in x. Each element in output vector shows how many ...

casi 2 años ago

Solved


Some tweaks in summation, Can you decode? :)
There are some tweaks in summation that you might observe via test suites Try if you can

casi 2 años ago

Solved


Get 1-4-3-4-4
Get the value of the indices in the title and assign it to an array

casi 2 años ago

Solved


Pull the variable y_correct from the Caller's Workspace
*Description* This highlights a very easy to use and high-scoring cheat that can be used on almost all Cody questions.

casi 2 años ago

Solved


Now 20% off!
Furloughs are hitting government workers this year. To commemorate getting one unpaid day off each week until the end of Septem...

casi 2 años ago

Solved


Addition Partition
You will be given two numbers, N and K. Write a MATLAB function that will determine how many different unique ways you can have...

casi 2 años ago

Solved


Break it up! Break it up!
You have N pennies. Write a Matlab script that will reveal how many different ways you can break up those pennies. For example...

casi 2 años 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...

casi 2 años ago

Solved


"Find out the best cricket"
This is how I originally read Problem 2013, so let's just go with it. Give me the first and last name of the best cricket, rega...

casi 2 años ago

Solved


wait for me
wait exactly x seconds please, need not be more than 2 seconds but must be accurate within say 50 milliseconds, your function mu...

casi 2 años ago

Solved


Reference Index Number
Given a reference set R of elements (each unique but identical in type), and a list V of elements drawn from the set R, possibly...

casi 2 años ago

Solved


Small Riddle
Mr. Smith has two children. If the older child is a boy, what are the odds that the other child is also a boy?

casi 2 años ago

Solved


Diagonal Pattern
For a positive integer |n|, return an |nXn| matrix |mat| such that the value of each element in row |i| and column |j| is given ...

casi 2 años ago

Load more