A résolu


Temperature question
get the temperature...in celcius

plus de 7 ans il y a

A résolu


Add Me To Death (Sum sum sum)
Given certain vector, sum of the input vector, get the sum of 2 adjacent numbers in the input, and sum of the output vector (wh...

plus de 7 ans il y a

A résolu


Count me in
Count the number of occurrences of the second input in the first input Ex. x1 = 12344455511; x2 =2; output = 1 ...

plus de 7 ans il y a

A résolu


Create cosine function out of sine
Please dont use cos(x) directly

plus de 7 ans il y a

A résolu


Energy of an object
Calculate the total mechanical energy of an object. Total Energy= Potential energy + Kinetic energy P.E.=m*g*h K.E.=1/2...

plus de 7 ans il y a

A résolu


Generate the sum of Squares of the given number
|P(n) = 1^2 + 2^2 + ... + n^2| |P(1) = 1| |P(2) = 1 + 4 = 5;| |P(3) = 5 + 9 = 14;| |P(4) = 14 + 16 = 30;|

plus de 7 ans il y a

A résolu


Generate this matrix
Generate the following matrix. n = 2; out = [-4 -3 -2 -1 0 -3 -2 -1 0 1 -...

plus de 7 ans il y a

A résolu


sinus function
x is the abscissa. find the absolute value of cosine of -x and the same value with changed sign.

plus de 7 ans il y a

A résolu


Generate pi using logarithm
Generate pi using logarithm

plus de 7 ans il y a

A résolu


Sum of diagonals elements of a matrix
Given a matrix, return the sum of all the elements across the diagonals. E.g. A = [1 2 3; 4 5 6; 7 8 9;...

plus de 7 ans il y a

A résolu


Nth roots of unity
First, find the n nth roots of unity. eg if n = 6, find the n distinct (complex) numbers such that n^6 = 1. <https://en.wiki...

plus de 7 ans il y a

A résolu


string comparision
compare two strings if both are same return 1 else return 0

plus de 7 ans il y a

A résolu


Step up
For given input array, output a array with all elements step up by two

plus de 7 ans il y a

A résolu


Throw common elements of two vector arrays in sorted manner
Throw common elements as output in sorted manner (acending order) of two given input vector arrays

plus de 7 ans il y a

A résolu


Duplicate a character
Duplicate a character 'n' times. Example 1: str='a' n=5 output='aaaaa' Example 2: str='*' n=3 output='***'

plus de 7 ans il y a

A résolu


Find out sum of prime number till given number
Find out sum of prime number till given number Example, if number is 10, then answer must be 17.

plus de 7 ans il y a

A résolu


Hard limit function
Classify x data as if x>=0 then y=1 if x<0 then y=0 Example x = [ -2 -1 0 1 2] y = [ 0 0 1 1 1]

plus de 7 ans il y a

A résolu


Conversion from hours to mili sec
Convert given input in hours to mili seconds

plus de 7 ans il y a

A résolu


square a vector-Given the variable x as your input, square it and put the result in y.
function y = (x)squared y = x; end

plus de 7 ans il y a

A résolu


Change the first and last diagonal element of the identity matrix to zero
Starting with the identity matrix, change first and last diagonal element to zero. Example If n=5 A = 0 0 ...

plus de 7 ans il y a

A résolu


Create vector as shown in test cases
Create vector as shown in test cases

plus de 7 ans il y a

A résolu


Sum of integers numbers
Sum of the numbers from 1 to 100

plus de 7 ans il y a

A résolu


Convert a vector into numbers
Suppose a vector x = [ 1 2 4 7] is given. You have to convert this vector into string number y = '1247'. Examples x = [ 1...

plus de 7 ans il y a

A résolu


Count number of words in string
Count number of words in string Examples 'hi', answer is 1 'hi hi', answer is 2 'I enjoy cody', answer is 3

plus de 7 ans il y a

A résolu


Vector Multiplication
Vector Multiplication of three matrix as shown in test cases.

plus de 7 ans il y a

A résolu


Add two different item as shown in example
Add two different item as shown in example x=5; y='ab'; Then output must be'5ab';

plus de 7 ans il y a

A résolu


Add one raw in given matrix as shown in example
*Add one raw in given matrix as shown in example* A=[1 0;0 1]; X=[3 5]; Answer must be:[1 0; 0 1;3 5]

plus de 7 ans il y a

A résolu


Calculate the Hamming distance between two strings
Inspired by a similar Cody problem found <http://www.mathworks.com/matlabcentral/cody/problems/93-calculate-the-levenshtein-dist...

plus de 7 ans il y a

A résolu


High school cafeteria
Given an input vector of positive integers, return a row vector with the primes first (in increasing order) and the composites n...

plus de 7 ans il y a

A résolu


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

plus de 7 ans il y a

Charger plus