
guanxin
Statistics
Cody
0 問題
31 解答
ランク
N/A
of 258,080
評価
N/A
貢献
0 質問
0 回答
回答採用率
0.00%
獲得投票数
0
ランク
8,974
of 110,258
貢献
0 問題
31 解答
スコア
356
バッジ数
2
貢献
0 投稿
貢献
0 パブリック チャネル
平均評価
貢献
0 Highlights
AVERAGE NO. OF LIKES
Content Feed
解決済み
Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...
9ヶ月 前
解決済み
Draw 'B'
Draw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 0 1 0 0 0 1 ...
9ヶ月 前
解決済み
Draw a 'X'!
Given n as input Draw a 'X' in a n-by-n matrix. example: n=3 y=[1 0 1 0 1 0 1 0 1] n=4 y=[1 0 0...
9ヶ月 前
解決済み
Check prime numbers
Let x, return 1 if x is a prime number, 0 otherwise e.g x = 7, return y =1; x = 6 return y = 0;
9ヶ月 前
解決済み
Triple function composition
Given three functions f,g and h, create the composed function y=f(g(h)). Example f = @(x) x+1 g = @(x) x/2 h = @(x) ...
9ヶ月 前
解決済み
generate the matrix
given a value n (say 4) - generate the matrix like below y= [0 1 2 3 4; -1 0 1 2 ...
9ヶ月 前
解決済み
Repeat elements of a vector
Repeat each elements of a given vector according to their values. * x=[1,2,1,3] * y=[1,2,2,1,3,3,3]
9ヶ月 前
解決済み
Draw a 'Z'.
Given _n_ as input, generate a n-by-n matrix like 'Z' by _0_ and _1_ . Example: n=5 ans= [1 1 1 1 1 0 0 0 1 ...
9ヶ月 前
解決済み
Draw 'H'
Draw a x-by-x matrix 'H' using 1 and 0. (x is odd and bigger than 2) Example: x=5 ans= [1 0 0 0 1 1 0 0 0 1 ...
9ヶ月 前
解決済み
Add Me To Death (Sum sum sum)
Given certain vector, sum of the input vector, get the sum of 2 adjacent numbers in the input, and sum of the output vector (wh...
9ヶ月 前
解決済み
Ring Matrix
Given n (only odd), return output matrix a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. ...
9ヶ月 前
解決済み
Remove NaNs and numbers adjacent to NaNs
The aim is to remove the elements before and after NaN occurrences inside a vector. For example: x = [6 10 5 8 9 NaN 23 1...
9ヶ月 前
解決済み
interesting center of magic matrix
output the centre of magic matrix of n input=7; output=25
9ヶ月 前
解決済み
Draw a 'N'!
Given n as input, generate a n-by-n matrix 'N' using 0 and 1 . Example: n=5 ans= [1 0 0 0 1 1 1 0 0 1 1 0 ...
9ヶ月 前
解決済み
Given a window, how many subsets of a vector sum positive
Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...
9ヶ月 前
解決済み
MATLAB Basics: Complex Argument
For a given complex number, x, return the argument, y, in degrees.
9ヶ月 前
解決済み
Find the Area of a Polygon
Consider 2-D geometry and assume that the points are given in form of rows of a matrix. Find the area of polygon enclosed by the...
9ヶ月 前
解決済み
Draw 'D'.
Draw a x-by-x matrix 'D' using 0 and 1. example: x=4 ans= [1 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0]
9ヶ月 前
解決済み
Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...
9ヶ月 前
解決済み
Function composition
Write a function that accepts two function handles f and g and returns the composition h. That is, h = (f o g)(x) = f(g(x)) ...
9ヶ月 前
解決済み
Draw 'E'
Draw a x-by-x matrix 'E' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...
9ヶ月 前
解決済み
Tridiagonal
Return an n-by-n matrix that has a, b, c as the subdiagonal, main diagonal, and superdiagonal entries in the matrix. Example ...
9ヶ月 前
解決済み
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...
9ヶ月 前
解決済み
Draw 'J'
Given n as input, generate a n-by-n matrix 'J' using 0 and 1 . Example: n=5 ans= [0 0 0 0 1 0 0 0 0 1 0 0 ...
9ヶ月 前