解決済み


Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

約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年 前

解決済み


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

約14年 前

解決済み


Differential equations I
Given a function handle |f| an initial condition |y0| and a final time |tf|, solve numerically the differential equation dy...

約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年 前

解決済み


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年 前

解決済み


Filter values in a vector
Cody often benefits from a functional style of programming. For example, your score is often better when you compose multiple fu...

約14年 前

解決済み


Create a dictionary
The goal is to write a function that returns a dictionary from a list of words or phrases and their definitions. Here is an exam...

約14年 前

解決済み


Nearest
*Description* Find the value and index of the element in vector _x_ that is nearest to value _y_. _y_ should be able to be a ...

約14年 前

解決済み


hackathon impossible
You might have found a solution to our <http://www.mathworks.com/matlabcentral/cody/problems/205-hackathon-the-beginnings previo...

約14年 前

解決済み


Great Circle Distance
Find shortest between two points on a ball given their azimuthal and polar angles (in degrees) as well as the radius of the sphe...

約14年 前

解決済み


the fly, the train, the second train, and their Zeno's paradox
*You have heard this one*: A train leaves station _A_ and travels with constant velocity _v1_. A second train leaves station _B_...

約14年 前

解決済み


the return of the hackathon
You might have found a solution to our <http://www.mathworks.com/matlabcentral/cody/problems/205-hackathon-the-beginnings previo...

約14年 前

解決済み


Hackathon: the beginnings
I am thinking of a number between 1 and 10000... can you guess what this number is? *Description* The test suite has rando...

約14年 前

解決済み


Reverse the Words (not letters) of a String
*Description* Change the words of a string such that the words appear in reverse order. You may assume that the string is a n...

約14年 前

問題


Mimic foldl in functional programming
Mimic the higher-order function |foldl| ( <http://en.wikipedia.org/wiki/Fold_%28higher-order_function%29 Wikipedia:Fold (higher-...

約14年 前 | 4 | 33 個のソルバー

解決済み


Mimic foldl in functional programming
Mimic the higher-order function |foldl| ( <http://en.wikipedia.org/wiki/Fold_%28higher-order_function%29 Wikipedia:Fold (higher-...

約14年 前

解決済み


Set a Soroban Abacus
*Description* This problem is the inverse of <http://www.mathworks.com/matlabcentral/cody/problems/136-read-a-soroban-abacus ...

約14年 前

解決済み


Double Deal
*Description* Given an input vector _v_, return the first element as the first output, the second element as the second outpu...

約14年 前

解決済み


Proper Factors
Generate the proper factors of input integer _x_ and return them in ascending order. For more information on proper factors, ref...

約14年 前

解決済み


Clockwise or Counterclockwise
Given a list of 2-d points defining the vertices of a polygon, determine whether these points are sorted clockwise. The input...

約14年 前

解決済み


Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

約14年 前

解決済み


hanoi towers II
with 3 rods (1,2 & 3), the goal is to move a tower of n disks from rod #1 to rod #3. You can move disks only one by one, on the...

約14年 前

解決済み


Equidistant numbers containing certain value in an interval
Given a lower and upper bound of an interval, distance between numbers, and one particular number from that interval, create an ...

約14年 前

解決済み


Test if a Number is a Palindrome without using any String Operations
*Description* Given an integer _X_, determine if it is a palindrome number. That is, _X_ is equal to the _X_ with the digits ...

約14年 前

解決済み


Pull the variable y_correct from the Caller's Workspace
*Description* This highlights a very easy to use and high-scoring cheat that can be used on almost all Cody questions.

約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年 前

解決済み


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

約14年 前

解決済み


The Tower of Hanoi
In the <http://en.wikipedia.org/wiki/Tower_of_Hanoi Tower of Hanoi problem> with 3 rods (1, 2 & 3), the goal is to move a tower ...

約14年 前

さらに読み込む