Community Profile # Dohyun Kim

10 2017 年以降の合計貢献数

#### Dohyun Kim's バッジ

Split array into pieces according to corresponding array
An array x of length n has values 1...m with each value appearing at least once. The values are sorted (n>=m). A second...

2年弱 前

longest sequence of nans
In an array return the length of longest sequence of nans for each column. x = [ 2 3 1 2 5 6; nan nan 5 n...

2年弱 前

Find indices of diagonal elements
Given a matrix A and a diagonal index d (where 0 indicates the main diagonal and off-diagonals are identified by positive and n...

2年弱 前

Elements with highest local average
Input v is a row vector such that length(v)>3. Consider a sliding window of length 3 that is used to calculate the local average...

2年弱 前

Sum my indices
Given inputs M and N (in that order), output an MxN matrix whose entries are equal to the sum of their indices. Example input...

2年弱 前

Hard limit function
Classify x data as if x>=0 then y=1 if x<0 then y=0 Example x = [ -2 -1 0 1 2] y = [ 0 0 1 1 1]

2年弱 前

Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

2年弱 前

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

2年弱 前

Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

2年弱 前

I am supposed to plot the size k of a Hilbert matrix and condition number . I am supposed to plot k = 5, 10, 15, 20, 25, 30 vs condition # wrt to 1-norm, cond inf-norm, cond 2-norm
k = [5,10,15, 20, 25, 30]; cond1 = zeros(1,length(k)); cond2 = zeros(1,length(k)); condinf = zeros(1,length(k)); ...