Community Profile

photo

Carsten


2012년부터 활동

통계

  • Leader
  • Speed Demon
  • Promoter
  • Solver

배지 보기

Content Feed

보기 기준

문제를 풀었습니다


Test if two numbers have the same digits
Given two integers _x1_ and _x2_, return |true| if the numbers written with no leading zeros contain the same digits. That is, t...

11년 초과 전

문제를 풀었습니다


The Dark Side of the Die
It is well-known that opposite sides of a classic hexahedral die add to 7. Given a vector of dice rolls, calculate the sum of th...

11년 초과 전

문제를 풀었습니다


Elapsed time is -0.005204 seconds.
Write a function that takes less than zero seconds to execute, as measured using tic and toc. For repeatability, the test case p...

11년 초과 전

문제를 풀었습니다


Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

11년 초과 전

문제를 풀었습니다


Three grind is shipsstraigt
A function that returns either 'Rock', 'Scissors', or 'Paper' (string). You may succeed or you may fail the (case insensitive) t...

11년 초과 전

문제를 풀었습니다


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

11년 초과 전

문제를 풀었습니다


Generate a string like abbcccddddeeeee
This is the string version of Problem 1035. <http://www.mathworks.com/matlabcentral/cody/problems/1035-generate-a-vector-like-1-...

11년 초과 전

문제를 풀었습니다


Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

11년 초과 전

문제를 풀었습니다


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

11년 초과 전

문제를 풀었습니다


2 b | ~ 2 b
Given a string input, output true if there are 2 b's in it, false if otherwise Examples: 'Macbeth' -> false 'Publius Cor...

11년 초과 전

문제를 풀었습니다


"mirror" matrix
Create n x 2n "mirror" matrix of this type: e.g. for n = 2 m = [1 2 2 1;1 2 2 1] e.g. for n = 3 m = [1 2 3 3 2 1...

11년 초과 전

문제를 풀었습니다


Become the leader
The goal of this problem is the same as the goal of the rest of them: *become the leader*. Actually, you can only solve this ...

11년 초과 전

문제를 풀었습니다


Remove DC
Input x is the sampled signal vector, may have both AC and DC components. Output y should not contain any DC component. Examp...

11년 초과 전

문제를 풀었습니다


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

11년 초과 전

문제를 풀었습니다


New Cody Time-Out Time
Determine the New Cody Time-Out Time Consume the Maximum Possible Time without Timing out. *Score:* 60 (sec) - Time (sec) ...

11년 초과 전

문제를 풀었습니다


Convert single-precision floating-point number to binary representation
Write a function which takes a scalar <http://en.wikipedia.org/wiki/Single-precision_floating-point_format single-precision floa...

11년 초과 전

문제를 풀었습니다


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

11년 초과 전

문제를 풀었습니다


Getting the indices from a matrice
Getting the indices from a matrice. Inspired by Problem 645. Getting the indices from a vector by the great Doug Hull. Given a...

11년 초과 전

문제를 풀었습니다


Find the two-word state names
Given a list of states, remove all the states that have two-word names. If s1 = 'Alabama Montana North Carolina Vermont N...

11년 초과 전

문제를 풀었습니다


Alphabetize by last name
Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...

11년 초과 전

문제를 풀었습니다


Add more zeros
Find code that adds one 0 to each sequence of 0 in a string (composed with only 0 or 1). For example: '1010' -> '100100' ...

11년 초과 전

문제를 풀었습니다


Create logical matrix with a specific row and column sums
Given two numbers *|n|* and *|s|*, build an |n-by-n| logical matrix (of only zeros and ones), such that both the row sums and th...

11년 초과 전

문제를 풀었습니다


Sophie Germain prime
In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...

11년 초과 전

문제를 풀었습니다


intersection of matrices
Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identi...

11년 초과 전

문제를 풀었습니다


Sum the entries of each column of a matrix which satisfy a logical condition.
Given a numeric matrix A and a logical array L of the same size as A, return a row vector S containing the columnwise sums of th...

11년 초과 전

문제를 풀었습니다


Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...

11년 초과 전

문제를 풀었습니다


AVIRIS Hyperspectral Bit Mask
The AVIRIS data sometimes is provided uncropped. This creates edge regions with values of "-50". Shown is AVIRIS Moffett Field i...

11년 초과 전

문제를 풀었습니다


Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

11년 초과 전

문제를 풀었습니다


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

11년 초과 전

문제를 풀었습니다


Find the repeating decimal pattern!
Write a function that takes one double input value and returns only the repeating decimal, if any, as a string. Only decimals f...

11년 초과 전

더 보기