Resuelto


Raise Matrix to Power
For a given square matrix x and scalar a, find x^a without using '^' or 'mpower'.

alrededor de 5 años hace

Resuelto


Combination of Vectors
Return a combination of vectors x1, x2 based on y1, y2 per: x(j) = 0 if y1(j) < y2(j) x(j) = x1(j) if y1(j)...

alrededor de 5 años hace

Resuelto


Compute average gain for some bets.
Given a vector containg the odds of some events in decimal format (e.g., |odds=[1.3 2.5 1.5]| ) and a vector of the same dimensi...

alrededor de 5 años hace

Resuelto


Usage of varargout
This Challenge is to demonstrate usage of varargout. Output a cell array using varargout of magic squares of size 1 thru n. ...

alrededor de 5 años hace

Resuelto


ZigZag - 03
Given a matrix of any size, print its elements from the zigzag form of the matrix. For example, a=[1 2 3; 4 5 6; ...

alrededor de 5 años hace

Resuelto


ZigZag - 05
Given a matrix, print all its elements in the alpha form. For example - a=[16 2 3 13 5 11 10 8 ...

alrededor de 5 años hace

Resuelto


Connect Four - 02
Previous Problem <https://www.mathworks.com/matlabcentral/cody/problems/45354-connect-four-01> In addition to previous proble...

alrededor de 5 años hace

Resuelto


Find index of non empty cell array
This question aims to understand the characteristics of MATLAB programs. Educational problem. Please find non empty index of ...

alrededor de 5 años hace

Resuelto


Find the index of elements in a string vector
In the vector of v, find the index of elements specified by a. v = ["Lion","Koara","Elephant","Snake","Dog","Cat","Camel"]; ...

alrededor de 5 años hace

Resuelto


Find 0 in array
Given array find where there 0 is.

alrededor de 5 años hace

Resuelto


Possible Outcomes of American Roulette
The payout for American roulette can be calculated by: payout = (38/n)-1 where n is the number of squares the bet covers. ...

alrededor de 5 años hace

Problema


Identify Ruth-Aaron numbers
After Hank Aaron hit his 715th home run and passed Babe Ruth’s total of 714, Carl Pomerance noticed that the union of the prime ...

alrededor de 5 años hace | 3 | 29 solvers

Resuelto


Find the centroid of triangle
Imagine that you want to calculate the *centroid* of some _triangles_ given in matrix form. First the coordinates of the vertice...

alrededor de 5 años hace

Resuelto


Calculate triangle area
Imagine that you want to calculate the areas of some triangles given in matrix form. First the coordinates of the vertices of th...

alrededor de 5 años hace

Resuelto


Electric Potential Energy

alrededor de 5 años hace

Resuelto


What's for Lunch?
Given b choices of beverages, e choices of entrees, s choices of sides (take two different sides total) and d choices of dessert...

alrededor de 5 años hace

Resuelto


Rotate a matrix without using rot90
rotate the input square matrix by certain degrees (e.g. 270 or 450 etc.) without using rot90 or flip function. its an extension...

alrededor de 5 años hace

Resuelto


Determine if input is a perfect number
A <http://en.wikipedia.org/wiki/Perfect_number/ perfect number> occurs whent the sum of all divisors of a positive integer, exce...

alrededor de 5 años hace

Resuelto


Determine if given number is perfect
A number is <http://en.wikipedia.org/wiki/Perfect_number perfect> if it is equal to the sum of its factors, excluding itself. ...

alrededor de 5 años hace

Resuelto


Primes for Large N: 2^30, System Memory Limit
This Challenge is to further improve the "primes" function for speed/memory usage to the Limit of Cody Memory. The Matlab fun...

alrededor de 5 años hace

Resuelto


normalize group of numbers to integers
Hi guys! I have a group of 4 numbers x,y,z,w which comes from 4 integers multiplied with a common factor. [x,y,z,w] = c [i,j,k,...

alrededor de 5 años hace

Resuelto


Angle between two vectors
Given 2 pairs of _cartesian co-ordinates_, determine the angle between the 2 vectors formed by the _points_ and the _origin_. An...

alrededor de 5 años hace

Resuelto


Alias abs to asb
Create an alias of a built-in function name. Goal is to alias asb with abs for dyslexic typers. The test suite will be ...

alrededor de 5 años hace

Resuelto


Matrix Indexing
Given a matrix A and scalars r,c,i, find the product of two elements, with the first element located at row r and column c (doub...

alrededor de 5 años hace

Resuelto


Matrix convolution
A certain convolution step involves an elementwise multipication between two 3x3 matrices and taking the resulting sum of the el...

alrededor de 5 años hace

Resuelto


Stacking vectors into a matrix
Given a 4x1 vector a, and a 2x2 matrix b, create a matrix M in which the first 2 rows are each identical to a and the last two r...

alrededor de 5 años hace

Resuelto


Matrix spiral
Make a spiral in a (n*n) matrix. The spiral has to start in the top left, and has to rotate clockwise to the center. The spiral ...

alrededor de 5 años hace

Resuelto


Adding and Subtracting UINT variables
Given UINT class variables output the correct solution to A-B+C. *Input:* A,B,C Three uint variables *Output:* solution ...

alrededor de 5 años hace

Resuelto


Greed is good - Simple partition P[n].
Find a simple partition P[n]. E.g. P[10] = 4 + 3 + 2 + 1. # There are many solutions, compute just one set. # Don't repeat ...

alrededor de 5 años hace

Resuelto


PEMDAS 101
Return the following results for scalar values a,b,c,d.

alrededor de 5 años hace

Cargar más