Draw a 'Z'.
Given _n_ as input, generate a n-by-n matrix like 'Z' by _0_ and _1_ .
Example:
n=5
ans=
[1 1 1 1 1
0 0 0 1 ...
5年以上 前
解決済み
Test if two numbers have the same digits
Given two integers _x1_ and _x2_, return |true| if the numbers written with no leading zeros contain the same digits. That is, t...
5年以上 前
解決済み
Min of a Matrix
Return the minimum value in the given matrix.
5年以上 前
解決済み
Perfect Square or not
find Given input x is perfect square or not,if yes then output y=1.else y=0
5年以上 前
解決済み
Number of 1s in a binary string
Find the number of 1s in the given binary string.
Example. If the input string is '1100101', the output is 4. If the input stri...
5年以上 前
解決済み
Roots
Find out the roots of a given polynomial equation.Given are the coefficients of the equation.
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...
Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n.
For example:
v=[1 2 3 4 5 6]
n=3
vNew =...
5年以上 前
解決済み
Create a two dimensional zero matrix
You have to create a zero matrix of size (mxn) whose inputs are m and n and the elements of your matrix should be zeros.
Exam...
5年以上 前
解決済み
kmph to mps
convert kilometer per hour to meter per second