Solved


行列内の素数の平均をとろう
行列が与えられたときに、その行列内の素数の平均を計算する関数を作成しましょう。 例: 入力の行列が in = [ 8 3            5 9 ] のとき、 出力が 4 あるいは (3+5)/2 のようになり...

9 meses ago

Solved


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

9 meses ago

Solved


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

9 meses ago

Solved


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

9 meses ago

Solved


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

9 meses ago

Solved


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

9 meses ago

Solved


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

9 meses ago

Solved


Matlab Basics - y as a function of x
Write a function to calculate y as a function of x, such that y = 6x^2 + 5x - 2

9 meses ago

Solved


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

9 meses ago

Solved


square root
Find the square root (y) of an input (x).

9 meses ago

Solved


Area of rhombus
Calculate the rhombus area

9 meses ago

Solved


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

9 meses ago

Solved


MATLAB Basic: rounding IV
Do rounding towards plus infinity. Example: -8.8, answer -8 +8.1 answer 9 +8.50 answer 9

9 meses ago

Solved


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

9 meses ago

Solved


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

9 meses ago

Solved


find the surface area of a cube
given cube side length x, find the surface area of the cube, set it equal to y

9 meses ago

Solved


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

9 meses ago

Solved


find radius of cone
if Slant height of Cone(I)& hight of Cone(H) given then find radius of the Cone(R) for example I=5,h=4 then the ans R=3;

9 meses ago

Solved


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

9 meses ago

Solved


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

9 meses ago

Solved


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

9 meses ago

Solved


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

9 meses ago

Solved


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

9 meses ago

Solved


Chào các bạn.
Cho 3 số. Tính tổng của chúng

9 meses ago

Solved


Inner product of two vectors
Find the inner product of two vectors.

9 meses ago

Solved


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

9 meses ago

Solved


Create a vector
Create a vector from 0 to n by intervals of 2.

9 meses ago

Solved


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

9 meses ago

Solved


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

9 meses ago

Solved


Is this triangle right-angled?
Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...

9 meses ago

Load more