解決済み


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

14年弱 前

解決済み


Find state names that start with the letter N
Given a list of US states, remove all the states that start with the letter N. If s1 = 'Alabama Montana Nebraska Vermont Ne...

約14年 前

解決済み


High school cafeteria
Given an input vector of positive integers, return a row vector with the primes first (in increasing order) and the composites n...

約14年 前

解決済み


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

約14年 前

解決済み


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

約14年 前

解決済み


Half?
If you toss an even number (x) of coins, what is the probability (y) of 50% head and 50% tail?

約14年 前

解決済み


Lose control
Remove all characters that are below space in ASCII value.

約14年 前

解決済み


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

約14年 前

解決済み


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

約14年 前

解決済み


Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

約14年 前

解決済み


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

約14年 前

解決済み


pressure to dB?
given x ratio of pressure, find corresponding y dB

約14年 前

解決済み


Which quadrant?
Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...

約14年 前

解決済み


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

約14年 前

解決済み


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

約14年 前

解決済み


DC chopper
Input x is the sampled signal vector, may have both AC and DC components. output vector y should have AC components removed then...

約14年 前

解決済み


Check to see if a Sudoku Puzzle is Solved
*Description:* Your task, should you choose to accept it, is to make a function that checks to see if a 9x9 matrix of integer...

約14年 前

解決済み


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

約14年 前

解決済み


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

約14年 前

解決済み


Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

約14年 前

解決済み


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

約14年 前

解決済み


So many choices
For inputs _n_ and _k_ (in that order), output the number of ways that k objects can be chosen from amongst n distinct objects. ...

約14年 前

解決済み


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

約14年 前

解決済み


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

約14年 前

解決済み


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

約14年 前

解決済み


All your base are belong to us
Find the base _b_ logarithm of the input decimal number _x_. Express the output as a decimal number. The first argument is the n...

約14年 前

解決済み


Scrabble Scores
Given a word, determine its score in <http://en.wikipedia.org/wiki/Scrabble Scrabble>. The input string will always be provide...

約14年 前

解決済み


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

約14年 前

解決済み


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

約14年 前

解決済み


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]

約14年 前

さらに読み込む