Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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...

fast 8 Jahre vor

Gelöst


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...

fast 8 Jahre vor

Gelöst


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...

fast 8 Jahre vor

Gelöst


lb to kilogram
convert lb to kilogram units, easy

fast 8 Jahre vor

Gelöst


Ounces to Kilograms
convert ounces to kilograms, easy

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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 ...

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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]

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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...

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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. * ...

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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...

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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 =...

fast 8 Jahre vor

Gelöst


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 = ...

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Gelöst


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...

fast 8 Jahre vor

Gelöst


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...

fast 8 Jahre vor

Mehr laden