Gelöst


Given a window, how many subsets of a vector sum positive
Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

mehr als 10 Jahre vor

Gelöst


Get ranking of a combination
I have the numbers pulled without replacement from the set [1 2 3 4 5 6 7 8 9 10 11 12 13]; They are then ordered from least to...

mehr als 10 Jahre vor

Gelöst


Create a two dimensional zero matrix
You have to create a zero matrix of size (mxn) whose inputs are m and n and the elements of your matrix should be zeros. Exam...

mehr als 10 Jahre vor

Gelöst


Return the Nth Output from an Input Command
*Description* Given _F_, a cell array whose first element is a function handle and subsequent elements are arguments, return ...

mehr als 10 Jahre vor

Gelöst


Find the maximum two numbers of every column of a matrix
Find the maximum two numbers of every column of a matrix. Example: If we input a matrix A = [ 1 2 4 6 0 3 ...

mehr als 10 Jahre vor

Gelöst


Ohm's Law
Well its Ohm's law... So V = IR! I will give two of the three values, such as V and I or I and R and you have to return th...

mehr als 10 Jahre vor

Gelöst


Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
The given function returns the index of the maximum value in a given matrix. such as X=[4,3,4,5,9,12,0,5] Ans= 6 if maxim...

mehr als 10 Jahre vor

Gelöst


GJam 2013 Veterans: Hedge
This Challenge is derived from <http://code.google.com/codejam/contest/2334486/dashboard Hedgemony>. This is the Large data set ...

mehr als 10 Jahre vor

Gelöst


ベクトルのスケーリング
入力したベクトルの大きさを1にしてください。

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


Find the position of first minimum value in an integer array with numbers
If x = [2 6 4 9 10 3 1 5 1] the the output should be 7, because the first minimum value (1) lies at the 7th position.

mehr als 10 Jahre vor

Gelöst


surface of a spherical planet
you just discovered its circumference, that is the input.

mehr als 10 Jahre vor

Gelöst


click away
Write a function that clicks on a GUI button. *Description*: Some times one wishes to use Matlab to automate some time con...

mehr als 10 Jahre vor

Gelöst


Upper triangular matrix
Create a function to retrieve the upper triangular matrix of a matrix (without using tril). The matrix will always be square. ...

mehr als 10 Jahre vor

Gelöst


Converting numbers back from extended form
Thanks for all the help you guys gave me on writing out the numbers in extended form in <http://www.mathworks.com/matlabcentral/...

mehr als 10 Jahre vor

Gelöst


Friday the 13th
According to superstition, lots of unpleasant stuff happens on Friday the 13th, so you might like to find the next occurence of ...

mehr als 10 Jahre vor

Gelöst


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

etwa 11 Jahre vor

Gelöst


Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

etwa 11 Jahre vor

Gelöst


select the primes of a vector
Find the prime numbers in a vector

etwa 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


Pattern matching
Given a matrix, m-by-n, find all the rows that have the same "increase, decrease, or stay same" pattern going across the columns...

mehr als 11 Jahre vor

Gelöst


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

mehr als 11 Jahre vor

Gelöst


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

mehr als 11 Jahre vor

Gelöst


The Goldbach Conjecture
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

mehr als 11 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

fast 12 Jahre vor

Gelöst


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

fast 12 Jahre vor

Gelöst


Rotate input square matrix 90 degrees CCW without rot90
Rotate input matrix (which will be square) 90 degrees counter-clockwise without using rot90,flipud,fliplr, or flipdim (or eval)....

fast 12 Jahre vor

Gelöst


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

fast 12 Jahre vor

Gelöst


Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

fast 12 Jahre vor

Mehr laden