A résolu


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

plus de 5 ans il y a

A résolu


Check if the input is a balanced prime

plus de 5 ans il y a

A résolu


Find two triangular numbers whose sum is input.
Find two triangular numbers whose sum is _input_. Note: The difference beetween the triangular numbers should be minimum.

plus de 5 ans il y a

A résolu


Adjoint matrix
given a matrix a, find the adjoint matrix of a.

plus de 5 ans il y a

A résolu


Find a common vertex
First input is T, a triplet list of indices. Second input is i, a single index (positive integer). The goal of this function is ...

plus de 5 ans il y a

A résolu


Find a common edge
First input is T, a triplet list of indices. Second input is e = [e1 e2], a row vector, couple of indices (positive distinct int...

plus de 5 ans il y a

A résolu


SAY 'OHYEAH'
Regardless of input, output the string 'OHYEAH'.

plus de 5 ans il y a

A résolu


Check prime numbers
Let x, return 1 if x is a prime number, 0 otherwise e.g x = 7, return y =1; x = 6 return y = 0;

plus de 5 ans il y a

A résolu


Square
square root of x

plus de 5 ans il y a

A résolu


Sum Sum Sum!
Calculate the sum of the natural numbers from 1 to n

plus de 5 ans il y a

A résolu


Chào các bạn.
Cho 3 số. Tính tổng của chúng

plus de 5 ans il y a

A résolu


Angle between two vectors
Given 2 pairs of _cartesian co-ordinates_, determine the angle between the 2 vectors formed by the _points_ and the _origin_. An...

plus de 5 ans il y a

A résolu


Find The Difference
Vector x is given.calculate the difference between the biggest and the smallest number that we can create from elements of x. f...

plus de 5 ans il y a

A résolu


Scalar Matrix Manipulation
Assume, input x is a scalar matrix such as, x = 2 0 0 0 2 0 0 0 2 th...

plus de 5 ans il y a

A résolu


Add consecutive integer numbers
Given consecutive numbers, add the numbers *without using the sum command in MATLAB.*

plus de 5 ans il y a

A résolu


Cube root of max value in a vector
Find the cube root of the maximum value in a vector

plus de 5 ans il y a

A résolu


Number Power
Raise a number to itself.

plus de 5 ans il y a

A résolu


You never ask a lady her age
Instead you ask her to multiply her age by 10, then subtract any of the first nine multiples of 9 (9,18,...,81), and tell you th...

plus de 5 ans il y a

A résolu


Pass the Threshold!!
Write a Matlab function that will take as input a matrix of arbitrary dimensions and a scalar threshold value, and return a vec...

plus de 5 ans il y a

A résolu


Find argmax of a function
You are given vectors x and y (=f(x)). Return the element of x for which f(x) is maximized.

plus de 5 ans il y a

A résolu


Calculate time taken by light to reach earth surface
We know the time(seconds) taken by light to reach surface of earth. What if the distance varies yearly or source of light moves ...

plus de 5 ans il y a

A résolu


Find the position of planet in solarsystem
Write a funtion named *nthplanet* which takes name of the planet as input string and provides the position of the planet, starti...

plus de 5 ans il y a

A résolu


sumdigits
function [p1,p2] = goldbach(n) for p1 = 1:n if isprime(p1) p2 = n - p1; if isprime(p2) re...

plus de 5 ans il y a

A résolu


Cull vector elements that contain a specified digit
Given inputs of (1) a row vector and (2) a digit, identify the elements of that vector that contain the digit, remove them, and ...

plus de 5 ans il y a

A résolu


Last Digit of fibonacci number

plus de 5 ans il y a

A résolu


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

plus de 5 ans il y a

A résolu


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

plus de 5 ans il y a

A résolu


Calculate cosine without cos(x)
Solve cos(x). The use of the function cos() and sin() is not allowed.

plus de 5 ans il y a

A résolu


Calculate sin(x) without sin(x)
Calculate y = sin(x) x = 0 -> y= 0 without the use of sin(x) or cos(x)

plus de 5 ans il y a

A résolu


pizza deals
Given two pizza slices of different sizes: * Slice A with angle alpha1, radius r1, and price p1 * Slice B with angle alpha2,...

plus de 5 ans il y a

Charger plus