Resuelto


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

casi 10 años hace

Resuelto


Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

casi 10 años hace

Problema


Solve system of equation!
Solve provided system of equation, and find x and y. 2*x+1*y=3 1*x+1*y=2 (hint: use inverse matrix)

casi 10 años hace | 0 | 67 solvers

Problema


Find x in provided equation!
x^2-2*x+1=0 What is x? (hint: use "roots")

casi 10 años hace | 1 | 121 solvers

Resuelto


Get all corner elements from a matrix where dimension of matrix is always equal to or greater than 2.
if a given matrix a = [1 2 3;4 5 6]; so answer is going to be [1 3;4 6]

casi 10 años hace

Resuelto


Divisible by 2
This is the first problem in a set of "divisible by x" problems. You will be provided a number as a string and the function you ...

casi 10 años hace

Resuelto


Mysterious digits operation (easy)
What is this digit operation? 0 -> 0 1 -> 9 121 -> 9 44 -> 6 15 -> 5 1243 -> 7 ...

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


Generate the Matrix!
Given n, generate the following matrix: a = [ n n-1 n-2 ... 2 1; n-1 n-1 n-2 ... 2 1; n-2 n-2 n-2 ... 2 1;...

casi 10 años hace

Resuelto


Find number of days
The input is two date in string format (dd-mm-yyyy) find out the number of days between these two dates. Example: input: ...

casi 10 años hace

Resuelto


What percentage?
Calculate the output c as the percentage of a on b for given a and b.

casi 10 años hace

Resuelto


Reverse the input
Given an input (n), produce an output in the reverse order with out using string variables or string function. Example x ...

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


Split a string into chunks of specified length
Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

casi 10 años hace

Resuelto


Vectorizing, too easy or too hard?
Please insert a . before any ^, * or / in the string. That's it!!

casi 10 años hace

Resuelto


Finding perimeter of a rectangle
A rectangle has a length of x centimeters and a width of w centimeters. Find the perimeter.

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


Find the logic
There exists one logic in between input and output. Find it (easy math). Example 1: x=13 then y=339; Example 2: x=26...

casi 10 años hace

Resuelto


Back to basics 18 - justification
Covering some basic topics I haven't seen elsewhere on Cody. Given a string with extra spaces in front and/or in back, return...

casi 10 años hace

Resuelto


Make a vector of prime numbers
Input(n) - length of vector with prime numbers Output(v) - vector of prime numbers Example: * n=1; v=2 * n=3; v=[2 3 5...

casi 10 años hace

Resuelto


Remove and Sort
Given a randomized array n, sort it and remove all odd integers. n=5 y = [2 4]

casi 10 años hace

Resuelto


Given a matrix, return the last eigen value
Given a matrix, return the first eigen value For example: x = magic(5) 17 24 1 8 15 23 5 7 14 ...

casi 10 años hace

Resuelto


frame of the matrix
Given the matrix M, return M without the external frame.

casi 10 años hace

Resuelto


Inverse of Hilbert matrix
Given a non-negative integer x, return the element-wise power of 2 of the inverse of Hilbert matrix.

casi 10 años hace

Resuelto


Center of mass
Given a matrix M(m,n), where m is the number of vertices of the geometrical element and n is 2 or 3 (2D-plane figure or 3D-solid...

casi 10 años hace

Resuelto


Array of Ones
Create a 100 X 100 array of ones.

casi 10 años hace

Resuelto


Volume of this donut
Given hole diameter a, and outermost diameter b, determine the volume y of the resulting donut.

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


random picture with random colours
write a function which creates a random(x,y) matrix with random RGB colours for example create_pic(5,5) gives us a 3d matrix. ...

casi 10 años hace

Resuelto


find radius of cone
if Slant height of Cone(I)& hight of Cone(H) given then find radius of the Cone(R) for example I=5,h=4 then the ans R=3;

casi 10 años hace

Cargar más