Resuelto


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


How many monitors are connected ?
How to obtain the numbers of monitors connected to your computer ?

más de 8 años hace

Resuelto


Twins in a Window
<http://en.wikipedia.org/wiki/Twin_primes Twin primes> are prime numbers that differ by 2, such as [11,13] or [41,43]. Write a f...

más de 8 años hace

Resuelto


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

más de 8 años hace

Resuelto


Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero? Clue: He was the first in the line ...

más de 8 años hace

Resuelto


Skip by a multiple
Given an integer create an array of its multiples. Array must have a length of 15

más de 8 años hace

Resuelto


Box!
Given a box, find the volume of the cube. With each side = a.

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

más de 8 años hace

Resuelto


Times 3 problem
When you enter the number, it should return the number multiplied by 3

más de 8 años hace

Resuelto


Negative matrix
Change the sign of all elements in given matrix.

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


Geometry: Find Circle given 3 Non-Colinear Points
*This Challenge is to determine the center and radius of a circle given three non-colinear points.* *Input:* Points *Outpu...

más de 8 años hace

Resuelto


Volume of a Simplex
Return the volume of a <http://en.wikipedia.org/wiki/Simplex regular _n_-simplex> with a unit side length. Results are up to...

más de 8 años hace

Resuelto


Generate the Matrix!
Given n, generate the following matrix: a = [ n n-1 n-2 ... 2 1; n-1 n-1 n-2 ... 2 1; n-2 n-2 n-2 ... 2 1;...

más de 8 años hace

Resuelto


metre to feet converter
The idea is to make a converter, which exchange meters to feets. We use a factor of 1m = 3.281*1f. so 3m are equals to 9.843 m...

más de 8 años hace

Resuelto


Cumulative product of a vector
Cumulative product of a vector example x=[1 2 5 10], then answer must be [ 1 2 10 100] *If you like this prob...

más de 8 años hace

Resuelto


Matlab Basics II - Log and natural log
Write a function that calculates the difference between the log and natural log of a vector, to two decimal places example: ...

más de 8 años hace

Resuelto


Basic commands - rounding
make a function which will round to integer, which is nearer to zero. Example x=[-2.5 2]; y=[-2 2];

más de 8 años hace

Resuelto


Reshape a Vector
Write a function that accept three inputs. The first one is a row vector S. The second and third arguments are m and n which de...

más de 8 años hace

Resuelto


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

más de 8 años hace

Resuelto


Divide by 4
Given the variable x as your input, divide it by 4 and put the result in y.

más de 8 años hace

Resuelto


prime test
find largest 2 digit prime number

más de 8 años hace

Resuelto


Matlab Basics - Rounding I
Write a script to round x DOWN to the next lowest integer: e.g. x = 2.3 --> x = 2 also: x = 2.7 --> x = 2

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


Find out missing number from a vector of 9 elements
You are given a vector of size 9, x = [x1 x2 x3 x4 x5 x6 x7 x8 x9] Elements of x may be randomly selected without repeati...

más de 8 años hace

Resuelto


Power of n ?
Determine if _x_ (positive integer) is a power of _n_, return true or false accordingly.

más de 8 años hace

Resuelto


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

más de 8 años hace

Resuelto


Kinetic Energy
Given the mass m and velocity v of an object, determine its <http://en.wikipedia.org/wiki/Kinetic_energy kinetic energy>.

más de 8 años hace

Cargar más