Gelöst


Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

mehr als 5 Jahre vor

Gelöst


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

mehr als 5 Jahre vor

Gelöst


Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

mehr als 5 Jahre vor

Gelöst


Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

mehr als 5 Jahre vor

Gelöst


Remove the Zero
Given an array n, remove all zeros

mehr als 5 Jahre vor

Gelöst


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

mehr als 5 Jahre vor

Gelöst


Determine the number of odd integers in a vector
Determine the number of unique odd integers in a vector. Examples: Input x = [2 5 8 3 7 1]; Output y = 4; Inp...

mehr als 5 Jahre vor

Gelöst


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

mehr als 5 Jahre vor

Gelöst


Perfect Square or not
find Given input x is perfect square or not,if yes then output y=1.else y=0

mehr als 5 Jahre vor

Gelöst


Square root of number
Square root of given number.

mehr als 5 Jahre vor

Gelöst


convert matrix to single column
given any matrix, convert it to single column

mehr als 5 Jahre vor

Gelöst


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


Calculate Simple Intrest for given data
P,N,R stands for Principle amount, No. of years and rate of intrest resp. Calculate intrest I

mehr als 5 Jahre vor

Gelöst


Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

mehr als 5 Jahre vor

Gelöst


only input
Return the output without writing any code into the function.

mehr als 5 Jahre vor

Gelöst


Multiply by 3
Given the variable x as your input, multiply it by three and put the result in y.

mehr als 5 Jahre vor

Gelöst


Volume of Cylinder
Compute the Circumference of a Cylinder given it's radius and height.Here x is the radius and y is the height

mehr als 5 Jahre vor

Gelöst


Temperature conversion
Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

mehr als 5 Jahre vor

Gelöst


Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

mehr als 5 Jahre vor

Gelöst


Output a vector which is table of 9
Output a vector which is table of 9

mehr als 5 Jahre vor

Gelöst


Sum the real and imaginary parts of a complex number
Sum the real and imaginary parts of a complex number. Example c = 1+2i has the solution 1 + 2 = 3

mehr als 5 Jahre vor

Gelöst


Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...

mehr als 5 Jahre vor

Gelöst


Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...

mehr als 5 Jahre vor

Gelöst


Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


surface of a spherical planet
you just discovered its circumference, that is the input.

mehr als 5 Jahre vor

Gelöst


Basics: 'Find the eigenvalues of given matrix
Find the eigenvalues y for a given matrix x.

mehr als 5 Jahre vor

Mehr laden