Solved


Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

bijna 4 jaar ago

Solved


Largest Twin Primes
<http://en.wikipedia.org/wiki/Twin_prime Twin primes> are primes p1, p2 = p1 + 2 such that both p1 and p2 are prime numbers. Giv...

bijna 4 jaar ago

Solved


Find the next prime number
Find the next prime number or numbers for given n. For example: n = 1; out = 2; or n = [5 7]; out = [7 11]; ...

bijna 4 jaar 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,...

bijna 4 jaar ago

Solved


construct matrix with identical rows
Input a row vector such as x=1:10. Now we need to construct a matrix with L rows,of which every row vector is a copy of x. E...

bijna 4 jaar ago

Solved


Change string to number
Change given string to number. (hint: there is already function) Changing from ['1234'] to [1234] is one of example

bijna 4 jaar ago

Solved


Log of a number
Write a script that will give the log of x as output.

bijna 4 jaar ago

Solved


Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

bijna 4 jaar ago

Solved


Matlab Basics - Convert a row vector to a column vector
Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

bijna 4 jaar ago

Solved


matlab indian players
answer is one of the indian matlab player(just for fun dont take serious)

bijna 4 jaar ago

Solved


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

bijna 4 jaar ago

Solved


Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

bijna 4 jaar ago

Solved


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

bijna 4 jaar ago

Solved


Proper Factors
Generate the proper factors of input integer _x_ and return them in ascending order. For more information on proper factors, ref...

bijna 4 jaar ago

Solved


Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...

bijna 4 jaar ago

Solved


Free passes for everyone!
_Simply return the name of the coolest numerical computation software ever_ *Extra reward* (get a _freepass_): Once a mont...

bijna 4 jaar ago

Solved


The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

bijna 4 jaar ago

Solved


Matlab Basics - y as a function of x
Write a function to calculate y as a function of x, such that y = 6x^2 + 5x - 2

bijna 4 jaar ago

Solved


Given area find sides
In a right angle triangle given area 'A' one arm=x, another arm=2x then find the value of x. For example, area A=400 then ...

bijna 4 jaar ago

Solved


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

bijna 4 jaar ago

Solved


Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

bijna 4 jaar ago

Solved


Add two numbers
Add two numbers (For beginners)

bijna 4 jaar ago

Solved


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

bijna 4 jaar ago

Solved


Square a Number
Given an input x, return y, which is equal to the square of x.

bijna 4 jaar ago

Solved


Young's modulus
Given a value of <http://en.wikipedia.org/wiki/Young_modulus Young's modulus> (Y) expressed on MegaPascal, convert it to the uni...

bijna 4 jaar ago

Solved


vectorization in N
For a given integer n (n>1), compute the sum f (i) (1 <= i <= n) where f (i) = 1 if n is odd and 2 otherwise.

bijna 4 jaar ago

Solved


Volume and area of a sphere
Input(r) - radius Output([v,s]) - volume and area

bijna 4 jaar ago

Solved


only input
Return the output without writing any code into the function.

bijna 4 jaar 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...

bijna 4 jaar ago

Solved


reverse string
input='rama' output='amar'

bijna 4 jaar ago

Load more