Community Profile

# Andrew Tran

##### Last seen: 13일 전
104 2019 이후 총 참여 횟수

#### Andrew Tran's 배지

세부 정보 보기...

참여 게시물
보기 기준

해결됨

Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

19일 전

해결됨

Too mean-spirited
Find the mean of each consecutive pair of numbers in the input row vector. For example, x=[1 2 3] ----> y = [1.5 2.5] x=[1...

19일 전

해결됨

Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

19일 전

해결됨

Test for balanced parentheses
Given the input inStr, give the boolean output out indicating whether all the parentheses are balanced. Examples: * If ...

19일 전

해결됨

It dseon't mettar waht oedrr the lrettes in a wrod are.
An internet meme from 2003 (read more <http://www.snopes.com/language/apocryph/cambridge.asp here>) asserted that readers are re...

19일 전

해결됨

Making change
Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

19일 전

해결됨

Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

21일 전

해결됨

You just measured its surface area, that is the input.

22일 전

해결됨

Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

22일 전

해결됨

How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

22일 전

해결됨

Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

22일 전

해결됨

Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

22일 전

해결됨

Return a list sorted by number of occurrences
Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

29일 전

해결됨

Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: \$99,999.99. E...

약 1달 전

해결됨

약 1달 전

해결됨

サイズが n*2n の "mirror" 行列（対称行列）を作成しましょう。 例: n=2 の場合、以下のような出力を返します。 m = [ 1 2 2 1 1 2 2 1 ] n = 3 の場合、以下のよう...

약 1달 전

해결됨

"mirror" matrix
Create n x 2n "mirror" matrix of this type: Examples For n = 2 m = [ 1 2 2 1 1 2 2 1 ] For n = 3 m = ...

약 1달 전

해결됨

약 1달 전

해결됨

テレビのサイズを求めてみよう
あなたは電気屋で働いています。 あなたの電気屋にテレビを買いに来たお客さんに「何インチのテレビを買いたいのか」と質問したところ、対角線の情報しかわからないと言われてしまいました。 しかし、テレビのインチを知るには、幅と高さの情報が必要です。 ...

약 1달 전

해결됨

What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...

약 1달 전

해결됨

ベクトル b にあるスカラ値 a が含まれていれば出力として 1 を返し、含まれていなければ 0 を返すような関数を作成しましょう。 例: a = 3; b = [1,2,4]; スカラ値 3 はベクトル b に含まれていない...

약 1달 전

해결됨

ゼロでない要素が一番多い行を探そう

약 1달 전

해결됨

약 1달 전

해결됨

약 1달 전

해결됨

ある数のベクトルが与えられた場合、そのベクトルの要素の一つが他の要素の二乗であれば true を返し、それ以外の場合は false を返すようなコードを書いてみましょう。 例: 入力が a = [2 3 4] のとき、 出力 b は t...

약 1달 전

해결됨

ベクトルの値が増加しているかを調べよう
ベクトルの値が増加している場合 (ベクトルの各要素が前の要素よりも大きい場合) には true を、そうでない場合には false を返すようなコードを書いてみましょう。 例: 入力が x = [-3 0 7] のとき、 関数の...

약 1달 전

해결됨

ベクトルのスケーリング

약 1달 전

해결됨

チェッカーボードを作ろう

약 1달 전

해결됨

サイコロを作ろう
1から6までの独立かつランダムな数値を返すような関数を作成しましょう。 例： >> [x1,x2] = rollDice(); と入力すると x1 = 5 x2 = 2 のような解を返します。

약 1달 전

해결됨

ベクトル [1 2 3 4 5 6 7 8 9 10]　の作成
MATLABでは,角括弧の中に要素を入れることで、ベクトルを作成できる。 x = [1 2 3 4] また次のようにも書ける（コンマはオプション）。 x = [1, 2, 3, 4] 問題：次のベクトルを出力する関数を作成せよ。...

약 1달 전