Gelöst


That's some divisor you've got there...
Given a positive integer x, calculate the sum of all of the divisors of the number. Please include the number itself in your fi...

mehr als 10 Jahre vor

Gelöst


Back to basics 17 - white space
Covering some basic topics I haven't seen elsewhere on Cody. Remove the trailing white spaces from the input variable

mehr als 10 Jahre vor

Gelöst


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

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


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 <http://www.ma...

mehr als 10 Jahre vor

Gelöst


How many trades represent all the profit?
Given a list of results from trades made: [1 3 -4 2 -1 2 3] We can add them up to see this series of trades made a profit ...

mehr als 10 Jahre vor

Gelöst


Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at <http://en.wikipedi...

mehr als 10 Jahre vor

Gelöst


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

mehr als 10 Jahre vor

Gelöst


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

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


Axis colors of matlab created PNG changes after saving in Powerpoint
Hi everybody, i'm post-processing data with MatLab saving the images in the png format. I tried both ways saving the images: ...

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


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


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

mehr als 10 Jahre vor

Gelöst


Circle area using pi
Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.

mehr als 10 Jahre vor

Gelöst


Back to basics 20 - singleton dimensions
Covering some basic topics I haven't seen elsewhere on Cody. Remove the singleton dimensions from the input variable (e.g. if...

mehr als 10 Jahre vor

Gelöst


Create a v-notch vector without "sort" function
Given a vector vec, create a v-shaped vector as shown below: vec = [ 10 2 3 89 5 7 90 0 12] ...

mehr als 10 Jahre vor

Gelöst


It dseon't mettar waht oedrr the lrettes in a wrod are.
An internet meme from 2003 (read more <http://www.snopes.com/language/apocryph/cambridge.asp here>) asserted that readers are re...

mehr als 10 Jahre vor

Gelöst


Find state names that end with the letter A
Given a list of US states, remove all the states that end with the letter A. Example: Input s1 = 'Alabama Montana Nebras...

mehr als 10 Jahre vor

Gelöst


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

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


Local Minima
Given a vector of data x, find the values of local minimum that is smaller than its neighbor elements. For example, if x =...

mehr als 10 Jahre vor

Gelöst


Too Many Zeros, Dump Them!
Sometimes when I create a matrix, I use this syntax: a = zeros(1000,1000); But when the function ends, I find that I don'...

mehr als 10 Jahre vor

Gelöst


Convert a Cell Array into an Array
Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'

mehr als 10 Jahre vor

Gelöst


Index one element in each vector of an array along a given dimension
Functions like min and max can return in their second output argument the index of the element in each vector along a particular...

mehr als 10 Jahre vor

Gelöst


Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

mehr als 10 Jahre vor

Gelöst


Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

mehr als 10 Jahre vor

Gelöst


Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...

mehr als 10 Jahre vor

Gelöst


GJam 2014 China Rd A: Library Sorting (Large)
This Challenge is derived from <http://code.google.com/codejam/contest/2924486/dashboard#s=p2 GJam 2014 China Sorting>. Subset ...

mehr als 10 Jahre vor

Mehr laden