解決済み


NaN (欠損値) が含まれている行を削除しよう
行列 A が与えられたとき、その行列の中に NaN (Not a number; 欠損値) の要素がある行を見つけ出し、その行を削除しましょう。 例: A = [ 1 5 8 -3 NaN 14 ...

約8年 前

解決済み


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

約8年 前

解決済み


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

約8年 前

解決済み


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

約8年 前

解決済み


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

約8年 前

解決済み


i forgot to use capital I
When referring to yourself you should write "I" (capital) and not "i". So correct the input string x, but be aware that other u...

約8年 前

解決済み


Print true if
all elements are larger than 5 a=[1 3 5 8 6]; b=[6 6 6 6 6]; function(a) should be false, and function(b) will be tru...

約8年 前

解決済み


The answer to life the universe and everything
Write a function that gives the answer to life the universe and everything to every input except the input is 42. In this case t...

約8年 前

解決済み


lb to kilogram
convert lb to kilogram units, easy

約8年 前

解決済み


Ounces to Kilograms
convert ounces to kilograms, easy

約8年 前

解決済み


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

約8年 前

解決済み


determine amount cookies left
started with 3 cookies and you never ate any how many are left

約8年 前

解決済み


The great 82-year-old
Let's answer the question below; 'I am *x* years old and I have never written programs. If I study from now, will I be able ...

約8年 前

解決済み


wipe out!
make all the elements in given x zero.

約8年 前

解決済み


true or false
if the matrix has a zero, return true. else, return false

約8年 前

解決済み


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

約8年 前

解決済み


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

約8年 前

解決済み


Shift elements of vector left
Shift elements of vector to the left. For ex. : Input_vec = [1 2 3 4 5] Output_vec = [2 3 4 5 1]

約8年 前

解決済み


raise 1/3
Raise a number to 1/3 power.

約8年 前

解決済み


Diagonal & Anti-Diagonal Matrix: Easy
Create a matrix as shown below from "magic" square. For example: if input x=9;then use mgic(x) and create the matrix...

約8年 前

解決済み


Concatenate strings
concatenate a variable number of input strings to produce one outputstring

約8年 前

解決済み


How many jokers?
* Given DNA codes of a group of suspects, * and a code for certain types of jokers, * Count how many jokers of that type. * ...

約8年 前

解決済み


Evil Number
Check if a given natural number is evil or not. Read more at <https://oeis.org/A001969 OEIS>.

約8年 前

解決済み


Summing Digits within Text
Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...

約8年 前

解決済み


Reverse Run-Length Encoder
Given a "counting sequence" vector x, construct the original sequence y. A counting sequence is formed by "counting" the entrie...

約8年 前

解決済み


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

約8年 前

解決済み


Making change
Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

約8年 前

解決済み


Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

約8年 前

解決済み


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

約8年 前

解決済み


Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

約8年 前

さらに読み込む