解決済み


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

2年弱 前

解決済み


Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

2年弱 前

解決済み


Matrix to column conversion
Given a matrix of any size, convert it into a column vector. e.g A=[10 20 30; 40 50 60] then, B = [10; 40; ...

2年弱 前

解決済み


Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

2年弱 前

解決済み


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

2年弱 前

解決済み


Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

2年弱 前

解決済み


Area of a disk
Find the area of a disk or circle. x= radius of the disk.

2年弱 前

解決済み


Find the Nth Root of a Given Number
Find the Nth root of a given number x. Examples x = 4096 n = 4 y = 8 x = 625 n = 5 y = 3.6239

2年弱 前

解決済み


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

2年弱 前

解決済み


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

2年弱 前

解決済み


Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return true if the triangle with sides a, b and c is right-...

2年弱 前

解決済み


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

2年弱 前

解決済み


Find the minimum element of the matrix
Example: If x = [3 9; 5 2] then y = 2

2年弱 前

解決済み


find the roots of a quadratic equation
for e.g x = [ 2 -1 -3] y = [1.5 -1]

2年弱 前

解決済み


Switch matrix to a column vector
for e.g. x = [1 2 3 4] y = 1 3 2 4

2年弱 前

解決済み


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

2年弱 前

解決済み


Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27

2年弱 前

解決済み


Sum of the Multiplication of Vectors
Given the vectors x and y as input, multiply the vectors and return the summation of its elements. Example: x = [1 2 ...

2年弱 前

解決済み


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

2年弱 前

解決済み


Squaring Matrix
Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

2年弱 前

解決済み


Arrange vector in ascending order
Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

2年弱 前

解決済み


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

2年弱 前

解決済み


length of a vector
Find twice the length of a given vector.

2年弱 前

解決済み


multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y. Examples: Input x = 2 Output y is ...

2年弱 前

解決済み


Find out total non zero element of matrix
Find out Non zero element of matrix A=magic(5) 17 24 1 8 15 23 5 7 14 16 4 6...

2年弱 前

解決済み


Replace May with April
For instance, if the input is input_str = 'The flowers may bloom in April'; then the output is output_str = 'The flo...

2年弱 前

解決済み


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

2年弱 前

解決済み


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

2年弱 前

解決済み


Square a Number
Given an input x, return y, which is equal to the square of x.

2年弱 前

解決済み


Check if equal
Return true if all the elements of an nD array are equal, false otherwise.

2年弱 前

さらに読み込む