Resuelto


Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

5 meses hace

Resuelto


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

5 meses hace

Resuelto


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

5 meses hace

Resuelto


How to subtract?
*&plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn* * Imagine you need to subtract one...

5 meses hace

Resuelto


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

5 meses hace

Resuelto


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

5 meses hace

Resuelto


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

5 meses hace

Resuelto


Figurate number triangle
Check whether the input matrix is a figurate number triangle: <http://mathworld.wolfram.com/FigurateNumberTriangle.html>

5 meses hace

Resuelto


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

5 meses hace

Resuelto


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

5 meses hace

Resuelto


Magic!
Check whether the input matrix is a normal magic square: http://en.wikipedia.org/wiki/Magic_square Output the logical value tr...

5 meses hace

Resuelto


Read a Soroban Abacus
*Description* The Soroban is the name of the modern Japanese abacus. Information on reading a Soroban can be found <http://we...

5 meses hace

Resuelto


Distance walked 2D
Suppose you go from x-y coordinates [3,4] to [0,0] to [0,1] to [1,1], then you walked 7 units of distance.

5 meses hace

Resuelto


Count from 0 to N^M in base N.
Return an array of numbers which (effectively) count from 0 to N^M-1 in base N. The result should be returned in a matrix, with ...

5 meses hace

Resuelto


Too mean-spirited
Find the mean of each consecutive pair of numbers in the input row vector. For example, x=[1 2 3] ----> y = [1.5 2.5] x=[1...

5 meses hace

Resuelto


Tune your guitar
Given an input string with the scientific pitch notation for standard tuning ( <http://en.wikipedia.org/wiki/Guitar_tunings#Stan...

5 meses hace

Resuelto


Increment a number, given its digits
Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

5 meses hace

Resuelto


Cannon Ball
Given g (acceleration due to gravity) and desired altitude x, find the minimum ground velocity of a cannon ball to reach x.

5 meses hace

Resuelto


give nth decimal place of pi
max 15th place after the decimal point is ok for now

5 meses hace

Resuelto


Solve the Sudoku Row
*Description* A simple yet tedious task occurs near the end of most Sudoku-solving algorithms, computerized or manual. The ta...

5 meses hace

Resuelto


Determine if a Given Number is a Triangle Number
*Description:* Determine if the elements of an input array are triangle numbers and return the result as an array with the sa...

5 meses hace

Resuelto


Number of 1s in the Binary Representation of a Number
*Description* Return the number of 1s in the (unsigned integer) binary representation of a number. This function should be ab...

5 meses hace

Resuelto


given 3 sides, find area of this triangle
1:3 -> 0; 3:5 -> 6

5 meses hace

Resuelto


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

5 meses hace

Resuelto


Least common multiple of many numbers
1:6 -> 60

5 meses hace

Resuelto


All capital?
Are all the letters in the input string capital letters? Examples: 'MNOP' -> 1 'MN0P' -> 0

5 meses hace

Resuelto


Function Iterator
Given a handle fh to a function which takes a scalar input and returns a scalar output and an integer n >= 1, return a handle f...

5 meses hace

Resuelto


Remove the polynomials that have positive real elements of their roots.
The characteristic equation for a dynamic system is a polynomial whose roots indicate its behavior. If any of the roots of the p...

5 meses hace

Resuelto


Renaming a field in a structure array
MATLAB has a <http://www.mathworks.com/help/techdoc/ref/setfield.html setfield> and a <http://www.mathworks.com/help/techdoc/ref...

5 meses hace

Resuelto


Indexed Probability Table
This question was inspired by a Stack Overflow question forwarded to me by Matt Simoneau. Given a vector x, make an indexed pro...

5 meses hace

Cargar más