A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


lb to kilogram
convert lb to kilogram units, easy

presque 8 ans il y a

A résolu


Ounces to Kilograms
convert ounces to kilograms, easy

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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]

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

Charger plus