Risolto


ゼロでない要素が一番多い行を探そう
行列 a が与えられたとき、行列 a の中で一番ゼロの要素が少ない行のインデクス r を返す関数を作成しましょう。このとき、行列 a には一つだけしかこの条件に当てはまる行がないと仮定します。 例: 入力として、行列 a = [ 1 ...

12 mesi fa

Risolto


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

12 mesi fa

Risolto


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

12 mesi fa

Risolto


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

12 mesi fa

Risolto


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

12 mesi fa

Risolto


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

12 mesi fa

Risolto


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

12 mesi fa

Risolto


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

12 mesi fa

Risolto


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

12 mesi fa

Risolto


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

12 mesi fa

Risolto


Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...

12 mesi fa

Risolto


Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

12 mesi fa

Risolto


Converts numbers into characters
Converts numbers into characters

12 mesi fa

Risolto


Find the max element of the array
Find the max element of the array

12 mesi fa

Risolto


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

12 mesi fa

Risolto


Calculate the average value of the elements in the array
Calculate the average value of the elements in the array

12 mesi fa

Risolto


to the 2 all elements
to the 2 all elements

12 mesi fa

Risolto


the average value of the elements
Calculate the average value of the elements in the array

12 mesi fa

Risolto


Double all elements in the array
Duplicate all elements in the array

12 mesi fa

Risolto


calculate the length of matrix
input 1 array, calculate the length

12 mesi fa

Risolto


Draw a '0' in a one matrix!

12 mesi fa

Risolto


Sum of series IX
What is the sum of the following sequence: Σ 1/k! for k=1...n for different n?

12 mesi fa

Risolto


Sum of series VIII

12 mesi fa

Risolto


Sum of series
a(n) = n^2 - (n-1)^2 find the summation of the series upto n i.e. a(1)+a(2)+...+a(n)

12 mesi fa

Risolto


Sum of series VI
What is the sum of the following sequence: Σk⋅k! for k=1...n for different n?

12 mesi fa

Risolto


Sum of series V
What is the sum of the following sequence: Σk(k+1) for k=1...n for different n?

12 mesi fa

Risolto


Sum of series IV
What is the sum of the following sequence: Σ(-1)^(k+1) (2k-1)^2 for k=1...n for different n?

12 mesi fa

Risolto


Sum of series III
What is the sum of the following sequence: Σ(2k-1)^3 for k=1...n for different n?

12 mesi fa

Risolto


Sum of series II
What is the sum of the following sequence: Σ(2k-1)^2 for k=1...n for different n?

12 mesi fa

Risolto


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

12 mesi fa

Carica altro