Community Profile

photo

Lap Nguyen


200 2019 이후 총 참여 횟수

Lap Nguyen's 배지

  • Community Group Solver
  • CUP Challenge Master
  • Introduction to MATLAB Master
  • Solver

세부 정보 보기...

참여 게시물
보기 기준

해결됨


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

1일 전

해결됨


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

1일 전

해결됨


チェッカーボードを作ろう
整数 n が与えられた時、以下の様な1と0を含むn×nの行列を作成しましょう。a(1,1) は1にする必要があります。 例: 入力 n = 5 出力 a が [1 0 1 0 1 0 1 0 1 0 ...

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일 전

해결됨


2倍してみよう - ここからスタート!
初めにこの問題を試してみよう。 入力としてxを与え、それを2倍して結果をyに代入せよ。 Examples: Input x = 2 Output y is 4 Input x = 17 Output y is 34 ...

1일 전

해결됨


ベクトルのスケーリング
入力したベクトルの大きさを1にしてください。

1일 전

해결됨


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

1일 전

해결됨


Pi Estimate 1
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>

1일 전

해결됨


radius of a spherical planet
You just measured its surface area, that is the input.

1일 전

해결됨


Pi Digit Probability
Assume that the next digit of pi constant is determined by the historical digit distribution. What is the probability of next di...

1일 전

해결됨


Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

1일 전

해결됨


Given a square and a circle, please decide whether the square covers more area.
You know the side of a square and the diameter of a circle, please decide whether the square covers more area.

1일 전

해결됨


Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

1일 전

해결됨


Convert radians to degrees
Given input in radians, output to degrees

1일 전

해결됨


Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.

1일 전

해결됨


Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...

1일 전

해결됨


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일 전

해결됨


Count number of words in string
Count number of words in string Examples 'hi', answer is 1 'hi hi', answer is 2 'I enjoy cody', answer is 3

약 1달 전

해결됨


Element by element multiplication of two vectors
Given two input vectors, return the element-by-element product. Example A = [1 2 3] B = [7 3 1] The answer should be...

약 1달 전

해결됨


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

약 1달 전

해결됨


Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

약 1달 전

해결됨


Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] ...

약 1달 전

해결됨


Check that number is whole number
Check that number is whole number Say x=15, then answer is 1. x=15.2 , then answer is 0. <http://en.wikipedia.org/wiki/Whole...

약 1달 전

해결됨


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

약 1달 전

해결됨


Reverse a matrix
Its simple. You have to reverse a given matrix.

약 1달 전

해결됨


Find out sum of all elements of given Matrix
Find out sum of all elements of given Matrix A=[1 2 3;4 5 6 ;7 8 9]; Answer must be: 45 *If you like this problem, pl...

약 1달 전

해결됨


Max of a Vector
Write a function to return the max of a vector

약 1달 전

해결됨


Determine the square root
Determine the square root of the value the user has entered, n.

약 1달 전

해결됨


Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

약 1달 전

Load more