문제를 풀었습니다


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

거의 2년 전

문제를 풀었습니다


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

거의 2년 전

문제를 풀었습니다


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

거의 2년 전

문제를 풀었습니다


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

거의 2년 전

문제를 풀었습니다


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

거의 2년 전

문제를 풀었습니다


二つのベクトルの要素ごとの積の平均を計算しよう
二つの同じ長さのベクトルが与えられたとき、二つのベクトルの要素ごとの積の平均を求めましょう。 例: 二つのベクトル [1 2 3] と [10 15 20] が与えられたとき、 それぞれの要素ごとの積の平均を取ると、 解は 33.3333 と...

거의 2년 전

문제를 풀었습니다


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

거의 2년 전

문제를 풀었습니다


Divisible by 12
Write a function to determine if a number is divisible by 12. Similar to the number six, this can be done by checking for divisi...

거의 2년 전

문제를 풀었습니다


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

거의 2년 전

문제를 풀었습니다


length of a vector
Find twice the length of a given vector.

거의 2년 전

문제를 풀었습니다


Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

거의 2년 전

문제를 풀었습니다


Divisible by 11
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

거의 2년 전

문제를 풀었습니다


Divisible by 10
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

거의 2년 전

문제를 풀었습니다


Project Euler: Problem 9, Pythagorean numbers
A Pythagorean triplet is a set of three natural numbers, a b c, for which, a^2 + b^2 = c^2 For example, 3^2 + 4^2 = 9 + 16 ...

거의 2년 전

문제를 풀었습니다


Divisible by 8
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

거의 2년 전

문제를 풀었습니다


Convert from Base 10 to base 5
Convert the input number from base 10 into base 5: for example: if a(in base 10)= 5 then a(in base 5)= 10

거의 2년 전

문제를 풀었습니다


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

거의 2년 전

문제를 풀었습니다


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

거의 2년 전

문제를 풀었습니다


Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...

거의 2년 전

문제를 풀었습니다


Is my wife right?
Regardless of input, output the string 'yes'.

거의 2년 전

문제를 풀었습니다


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

거의 2년 전

문제를 풀었습니다


Find max
Find the maximum value of a given vector or matrix.

거의 2년 전

문제를 풀었습니다


An Ohm's Law Calculator
*BACKGROUND / MOTIVATION:* Many important observations in math and science can be described by short, but powerful, equations...

거의 2년 전

문제를 풀었습니다


Make a run-length companion vector
Given a vector x, return a vector r that indicates the run length of any value in x. Each element in r shows how many times the ...

거의 2년 전

문제를 풀었습니다


Divisors of an integer
Given a number N, return a vector V of all integers that divide N. For example, N = 10 Then V=[1 2 5 10]

거의 2년 전

문제를 풀었습니다


Product of elements in row
Product of matrix such that a=[3 3 1] b=9

거의 2년 전

문제를 풀었습니다


Electrical Diode Current Calculation
In engineering, there is not always a single equation that describes a phenomenon accurately enough to be applied in all instanc...

거의 2년 전

문제를 풀었습니다


Mersenne Primes vs. All Primes
A Mersenne prime (M) is a prime number of the form M = 2^p - 1, where p is another prime number. <https://www.mathworks.com/matl...

거의 2년 전

문제를 풀었습니다


Divisible by 9
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

거의 2년 전

문제를 풀었습니다


Divisible by 6
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

거의 2년 전

더 보기