Solved


Phonebook-like problem
strcmpi('Yes', 'No')

8 years ago

Solved


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

8 years ago

Solved


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

8 years ago

Solved


Element by element multiplication of two vectors
Given two input vectors, return the element-by-element product. Example A = [1 2 3] B = [7 3 1] The answer should be...

8 years ago

Solved


Basics: Divide integers to get integer outputs in all cases
Divide integers a and b in such a way that output y is always an integer (in ceil manner)

8 years ago

Solved


Vector Magnitude Calculator
'a' is a vector that starts at the origin and ends at (x, y). Find ||a||. Hint: It is as simple as "ABC".

8 years ago

Solved


calculate RMS voltage
given peak to peak voltage, calculate rms voltage

8 years ago

Solved


Speed of car
Calculate the Speed of car given its Distance travelled and time taken in x and y respectively

8 years ago

Solved


Tiling a matrix
Given a matrix and a number of columns, replicate matrix in a single row

8 years ago

Solved


Number of odd and even elements within matrix
Input(m) - any matrix with integers Output(n) - n(1)=number of odd elements, n(2)=number of even elements Example: * m=...

8 years ago

Solved


Replace every 3rd element in a vector with 4
x is a vector of undetermined length You are to replace every 3rd element with the number 4, example: x = [11 23 34 43 2 3...

8 years ago

Solved


Product of elements in row
Product of matrix such that a=[3 3 1] b=9

8 years ago

Solved


Back to Basics - Find no. of elements in a matrix?
Let A be a m*n matrix. Find the total no. of elements in A ? (Hint - formula based) A = [1 2 3;4 5 6]; output = 6

8 years ago

Solved


Find the position of first minimum value in an integer array with numbers
If x = [2 6 4 9 10 3 1 5 1] the the output should be 7, because the first minimum value (1) lies at the 7th position.

8 years ago

Solved


Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.

8 years ago

Solved


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

8 years ago

Solved


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

8 years ago

Solved


Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

8 years ago

Solved


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

8 years ago

Solved


Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

8 years ago

Solved


"Find out the best cricket"
This is how I originally read Problem 2013, so let's just go with it. Give me the first and last name of the best cricket, rega...

8 years ago

Solved


Find Factrorial without using built-in function
A number is given, you have to find the factorial of the number without using built-in factroial function. You may use loops....

8 years ago

Solved


square root
Find the square root (y) of an input (x).

8 years ago

Solved


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

8 years ago

Solved


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

8 years ago

Solved


Remove the positive integers.
Given array,x, remove all the positive numbers and display ouput as y. Example x=[1 -2 3 -4] , output is y=[-2 -4].

8 years ago

Solved


Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...

8 years ago

Solved


factorial of a number x
Factorial of a number x

8 years ago

Solved


Matlab Basics II - Max & Index of Max
Write a function that takes a vector x, then returns both the max value in x and its location in the vector for example x ...

8 years ago

Solved


Matlab Basics II - Velocity of a particle
A particle is moving in space, such that it's velocity is given by: <<http://s30.postimg.org/5rf1xtvj5/cody1.png>> write a...

8 years ago

Load more