Gelöst


Sum all integers from 1 to 2^x
Given a number x, your function must return the summation of all integers from 1 to 2^x.

mehr als 5 Jahre vor

Gelöst


Find Logic 14

mehr als 5 Jahre vor

Gelöst


Find Logic 17

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


Problem for beginners
Suppose that x is a column vector, with at least a length of 6. Delete the 2., 6., and the second last row. Example: X=[1;2;3...

mehr als 5 Jahre vor

Gelöst


Find Logic 18

mehr als 5 Jahre vor

Gelöst


calculate linear convolution two vectors
for e.g in: a = [1 2 3] b = [4 5 6] out: y = [4 13 28 27 18]

mehr als 5 Jahre vor

Gelöst


ascii value
let input='a' output=97

mehr als 5 Jahre vor

Gelöst


vector to string
Determine what the ASCII characters spell out. Example: input = [ 72 73 71 72] output = 'HIGH'

mehr als 5 Jahre vor

Gelöst


Convert number from given base to other base
Convert number from given base to other base. Example 400 in base 5, find equivalent number in base 8, it is 144.

mehr als 5 Jahre vor

Gelöst


Find Logic 19

mehr als 5 Jahre vor

Gelöst


Calculate the number of elements in a matrix.
Calculate the number of elements in a matrix.

mehr als 5 Jahre vor

Gelöst


Radians to Degrees
Convert radians to degrees.

mehr als 5 Jahre vor

Gelöst


Rankine to Celsius Converter
Given input R, degrees Rankine, convert into degrees Celsius.

mehr als 5 Jahre vor

Gelöst


Find the distance traveled by a car given velocity and time.
A car is traveling at a constant velocity for a specific amount of time. The function should use the two inputs, velocity and ti...

mehr als 5 Jahre vor

Gelöst


Kinetic Energy
Given mass, m, and kinetic energy, KE, find the velocity of the object.

mehr als 5 Jahre vor

Gelöst


Times 10
Try out this test problem first. Given the variable x as your input, multiply it by ten and put the result in y. Examples:...

mehr als 5 Jahre vor

Gelöst


Square
X is a number, write a code, where Y should be the square of X.

mehr als 5 Jahre vor

Gelöst


Generate n equally spaced "intervals" between -x and x (★)
Given n and x, return a list of numbers (in ascending order) that divides the interval [-x x] into n equal-length intervals. ...

mehr als 5 Jahre vor

Gelöst


Create a vector of n alternating ones and zeros (★★)
Given n, your output should be a vector y of numbers such that the first number is 1 and the numbers following it alternate betw...

mehr als 5 Jahre vor

Gelöst


Element-wise vector product (★)
Given two vectors x and y, compute their element-wise product z. Thus, if x = [1 3 5] and y = [0.5 -1 2], then z = [1*0.5...

mehr als 5 Jahre vor

Gelöst


Swap the first and last columns (★★)
(copy of Prob 19) Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becom...

mehr als 5 Jahre vor

Gelöst


Create a vector of the first n odd numbers (★)
If n = 10, your program should return a vector y, where y = [1 3 5 7 9 11 13 15 17 19].

mehr als 5 Jahre vor

Gelöst


Factorize uniquely! (★★)

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


easy problem
Find the last element of the array

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


Triangle???
Calculate the circumference of an equilateral triangle with x

mehr als 5 Jahre vor

Gelöst


Binary code (array)
Write a function which calculates the binary code of a number 'n' and gives the result as an array(vector). Example: Inpu...

mehr als 5 Jahre vor

Mehr laden