Solved

Combination logic

Create an algorithm in MATLAB that calculate the combination for the given positive integers n and k as inputs. When k > n, the ...

5 months ago

Solved

What's the missing interior angle?

I'm talking about polygons... The sum of the interior angles of a triangle is 180 degrees. The sum of the interior angles of a...

5 months ago

Solved

Can you reshape the matrix?

Given a matrix A, is it possible to reshape it into another matrix with the given number of rows?

5 months ago

Solved

Define the operators of function_handles

Suppose f and g are function_handles, try to define f+g,f-g,f*g and f/g. e.g. if f = @(x)x and g = @(x)x+1 ...

5 months ago

Solved

sum of ASCII

Given a string x, return the sum of all ASCII numbers of all characters. for example, if x='lala' ('l'-> 108, 'a'->97) then y...

5 months ago

Solved

Find third Side of a right triangle given hypotenuse and a side. No * - or other functions allowed

Find the remaining side of a triangle given the hypotenuse and a side. However, the normal functions and symbols are not allowe...

5 months ago

Solved

Multiply 2 numbers

Very easy, you just have to multiply 2 numbers but you cannot use the following signs (*, /, - ,^) ,mtimes , times, cross, pro...

5 months ago

Solved

Television Screen Dimensions

Given a width to height ratio of a TV screen given as _w_ and _h_ as well as the diagonal length of the television _l_, return t...

5 months ago

Solved

Negation the hard way

Write a function that has the following property: f(f(x)) = -x for any numeric array x. Note that there is no restriction on ...

5 months ago

Solved

Find the number of days in a given year

Given a year number (eg. 2000) as input, find how many days are there in the given year.

5 months ago

Solved

Low level NaN

* I have a dataset. Columns represents different variables. * A variable may start with NaN or any double type number. * If i...

5 months ago

Solved

given number is power of n or not?

Check weather The input is power of n or not? for example x=8,n=2 --> true x=6,n=2 --> false

5 months ago

Solved

remove nans fast

There are several ways to locate and remove nans in a matrix, and return an 1d row vector. In this problem the challenge is ...

5 months ago

Solved

Returning a "greater than" vector

Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

5 months ago

Solved

Tiling a matrix

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

5 months ago

Solved

Sum of logarithms

Given a vector, v, of real positive numbers, compute the sum, s, of the base-10 logarithms of the elements of v, without the use...

5 months ago

Solved

Throw common elements of two vector arrays

Throw common elements as output of two given input vector arrays

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

5 months ago

Solved

String substitution, sub problem to cryptoMath

This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

5 months ago

Solved

Generate a random matrix A of (1,-1)

Input n: is an positive integer which serves as the dimension of the matrix A; Output: A=(Aij),where each entry Aij is either...

5 months ago

Solved

How to add?

* Imagine you are in 2222 Anno Domini, when everyone must learn how to add, * and competing for the highly prestigious post of,...

5 months ago

Solved

persistant sum

There will be 9 tests for this problem. In each test you will be provided with 2 integers n=[n1,n2], where n2 is equal to t...

5 months ago

Solved

Consecutive Powers

Return 2 numbers and 2 powers such that their difference is 1 A 4 element row vector is expected: x where x(1)^x(2) - x(...

5 months ago

Solved

Evaluate Polynomial

Given a polynomial equation coefficients in a vector p, you have to return its value at x. Example: For inputs p and x ...

5 months ago

Solved

Sum of digits of powers of 2

Given n, first, calculate the number 2^n. Then, sum the digits that comprise that number. For example: Input: n = 7 2^n = ...

5 months ago

Solved

Test

Answer the question and the correct answer write in vector. Only one answer is correct. 1a Yes 1b No 1c No 1d No ...

5 months ago

Solved

So many choices

For inputs _n_ and _k_ (in that order), output the number of ways that k objects can be chosen from amongst n distinct objects. ...

5 months ago