Community Profile

photo

Jiahang Li


Last seen: Today
948 total contributions since 2018

Information and computing science student in China. I started playing Cody on 27th February 2018. MATLAB is my favorite tool in learning.

Jiahang Li's Badges

  • Community Group Solver
  • Project Euler I
  • First Review
  • Indexing I Master
  • ASEE Challenge Master
  • Scholar
  • Cody Problems in Japanese Master
  • Leader
  • CUP Challenge Master
  • Speed Demon
  • Creator
  • Commenter
  • Promoter
  • Solver

View details...

Contributions in
View by

Solved


Subtract two positive numbers
Given a and b as a string, return b-a without using string to number conversion functions. a and b must to be a same size and b ...

31 minutos ago

Solved


index of n^2 in magic(n)
input=5 magic matrix 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 ...

41 minutos ago

Solved


Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...

alrededor de 1 hora ago

Solved


Create an n-by-n null matrix and fill with ones certain positions
The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...

alrededor de 1 hora ago

Solved


Determine the number of odd integers in a vector
Determine the number of unique odd integers in a vector. Examples: Input x = [2 5 8 3 7 1]; Output y = 4; Inp...

alrededor de 1 hora ago

Solved


Determine the mean of matrix
Determine the mean of matrix without using mean function Hint: use simple algorithm

alrededor de 1 hora ago

Solved


Transpose of matrix
Transpose of matrix as per test cases

alrededor de 24 horas ago

Solved


find nth even fibonacci number
1st even fibonacci number=2 ; 2nd even fibonacci number=8 ..

alrededor de 24 horas ago

Solved


generate the matrix
given a value n (say 4) - generate the matrix like below y= [0 1 2 3 4; -1 0 1 2 ...

alrededor de 24 horas ago

Solved


Calculating large fibonacci numbers
The fibonacci sequence starts 1,1,2,3,5,8... Find the the n'th fibonacci number. Then calculate round(log10( . )) of that n't...

alrededor de 24 horas ago

Solved


Find the sequence
Find the nth number of a sequence. Check the test suite to determine the sequence. * hint: it is closely related to familiar ...

alrededor de 24 horas ago

Solved


Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation, * F(n) = F(n-1) + F(n-2) * where F(1) = 1 and F(1)...

1 día ago

Solved


Find the complement of a number in binary
Input x is a decimal number and output y is the complement of binary representation of x. For example, x = 10 has the binary ...

2 días ago

Solved


Rearrange string
Input is a given string. Output is the number of ways to rearrange the string.

2 días ago

Solved


Cody problems in French : Trouvez la logique Pt.2
Trouvez la logique entre x et y, aidez-vous de la test suite. Bon courage. P.S: L'utilisation de "^" est de nouveau fortement...

2 días ago

Solved


Day counter function
Write a function called _day_counter_ that returns the number of Mondays that fell on the first day of the month in a given year...

2 días ago

Solved


Recursion - Fun
Generate the first k terms in the sequence a(n) define recursively by a(n+1)=p*a(n)+(1+a(n)) with p=0.9 and a(1)=0.5 ...

2 días ago

Solved


Solve equation numerically
y'=y In order to solve equation using computer, numerical analysis are needed. 1st order Euler's method is one of the metho...

2 días ago

Solved


Two dimensional moving average
A=[1 2 3 4 5 1 2 2 2 3 2 3 3 3 4 1 1 4 4 2] B=[1 1;1 1]; % This is can be used for weight factor of moving a...

2 días ago

Solved


Rotate Matrix Both Direction (45 Degree)
*Matrix (3x3 only) rotation*: 3 inputs: *x* matrix, *n* times and *m* option. output: *y* matrix with *n x 45* degree ...

2 días ago

Solved


Scalar Matrix Manipulation
Assume, input x is a scalar matrix such as, x = 2 0 0 0 2 0 0 0 2 th...

2 días ago

Solved


Calculate geostrophic current
eta0=0.01; R=300; f=0.01; g=9.81; x=-500:50:500; y=-500:50:500; [x y]=meshgrid(x,y); eta=eta0*exp(-(x.^2+...

2 días ago

Solved


Find the distance traveled by a car given velocity and time.
A car is traveling at a constant velocity for a specific amount of time. The function should use the two inputs, velocity and ti...

2 días ago

Solved


Speed of car travelling x meters in y seconds
What is the speed of a car if the car travelled x meters in y seconds? Supply the answer in m/s.

2 días ago

Solved


wipe out!
make all the elements in given x zero.

2 días ago

Solved


How to permute given 3d matrix?
A(:,:,1)=[1 3] A(:,:,2)=[2 2] A(:,:,3)=[4 3] Change rows to columns and columns to rows, similar to transpose. Resul...

2 días ago

Solved


Extract a specific part of matrix!
In the given matrix, extract element that have odd rows and column number. For example A=[1 4 2 3 5] B=extractodd(A);...

2 días ago

Solved


determine amount cookies left
started with 3 cookies and you never ate any how many are left

2 días ago

Solved


Determine point is located in a circle or not
Using input [x] and [y], determine the points (x,y) is located inside of circle (x^2+y^2=1) if point is located in circle,...

2 días ago

Solved


CARDS PROBLEM
Read my mind and tell me the card number that I have now in my hands.

2 días ago

Load more