Jim Hokanson
Duke University
Followers: 0 Following: 0
Statistiken
RANG
314
of 289.919
REPUTATION
256
BEITRÄGE
93 Fragen
71 Antworten
ANTWORTZUSTIMMUNG
52.69%
ERHALTENE STIMMEN
138
RANG
207 of 19.607
REPUTATION
6.445
DURCHSCHNITTLICHE BEWERTUNG
4.70
BEITRÄGE
5 Dateien
DOWNLOADS
306
ALL TIME DOWNLOADS
58050
BEITRÄGE
0 Beiträge
BEITRÄGE
0 Öffentlich Kanäle
DURCHSCHNITTLICHE BEWERTUNG
BEITRÄGE
0 Highlights
DURCHSCHNITTLICHE ANZAHL DER LIKES
Feeds
Gelöst
Get the length of a given vector
Given a vector x, the output y should equal the length of x.
8 Monate vor
Gelöst
Determine if Input is Oddish or Evenish (Odd/Even Sum of Digits)
Given a positive integer n, determine whether n is "oddish" or "evenish" - that is, whether the sum of the digits of n is odd or...
8 Monate vor
Gelöst
Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.
8 Monate vor
Gelöst
Array GCD
* Find Greatest Common Divisor in a given array * Function Template: function ans = arraygcd(a) % a=[45 15 200 ...
mehr als 5 Jahre vor
Gelöst
An asteroid and a spacecraft
🚀 Imagine a non-relativistic simple situation. Assume positions p0, p1, p2, and p3 are three dimensional Cartesian ...
mehr als 6 Jahre vor
Gelöst
5th Time's a Charm
Write a function that will return the input value. However, your function must fail the first four times, only functioning prope...
mehr als 6 Jahre vor
Gelöst
Number of Even Elements in Fibonacci Sequence
Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...
mehr als 6 Jahre vor
Gelöst
"Cody" * 5 == "CodyCodyCodyCodyCody"
*Alice*: What? *"Cody" * 5 == "CodyCodyCodyCodyCody"*? You've gotta be kidding me! *Bob*: No, I am serious! Python supports...
mehr als 6 Jahre vor
Gelöst
The 5th Root
Write a function to find the 5th root of a number. It sounds easy, but the typical functions are not allowed (see the test su...
mehr als 6 Jahre vor
Gelöst
Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]
mehr als 10 Jahre vor
Gelöst
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...
etwa 12 Jahre vor
Gelöst
Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...
etwa 12 Jahre vor
Gelöst
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...
etwa 12 Jahre vor
Gelöst
Find the palindrome
Given the string a, find the longest palindromic sub-string b. So when a = 'xkayakyy'; you should return b = 'kayak';
etwa 12 Jahre vor
Gelöst
Find the two most distant points
Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...
etwa 12 Jahre vor
Gelöst
Find relatively common elements in matrix rows
You want to find all elements that exist in greater than 50% of the rows in the matrix. For example, given A = 1 2 3 5 ...
etwa 12 Jahre vor
Gelöst
Tic Tac Toe FTW
Given a tic tac toe board: * 1 represents X * 0 represents empty. * -1 represents O It is X's move. If there is an imme...
etwa 12 Jahre vor
Gelöst
Make a Palindrome Number
Some numbers like 323 are palindromes. Other numbers like 124 are not. But look what happens when we add that number to a revers...
etwa 12 Jahre vor
Gelöst
Maximum running product for a string of numbers
Given a string s representing a list of numbers, find the five consecutive numbers that multiply to form the largest number. Spe...
etwa 12 Jahre vor
Gelöst
Duplicates
Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...
etwa 12 Jahre vor
Gelöst
QWERTY coordinates
Given a lowercase letter or a digit as input, return the row where that letter appears on a <http://en.wikipedia.org/wiki/Keyboa...
etwa 12 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...
etwa 12 Jahre vor
Gelöst
De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...
etwa 12 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...
etwa 12 Jahre vor
Gelöst
Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...
etwa 12 Jahre vor
Gelöst
Sums with Excluded Digits
Add all the integers from 1 to n in which the digit m does not appear. m will always be a single digit integer from 0 to 9. no...
etwa 12 Jahre vor
Gelöst
All capital?
Are all the letters in the input string capital letters? Examples: 'MNOP' -> 1 'MN0P' -> 0
etwa 12 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...
etwa 12 Jahre vor
Gelöst
Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...
etwa 12 Jahre vor