Solved


Primitive Root Modulo n
Given a positive integer n > 2, return a vector, v, of positive integers smaller than n that are primitive roots modulo n. If no...

5 månader ago

Solved


nxn matrix with elements from 1:n^2
really simple once you see what the matrix is supposed to look like. i appreciate what seems to be a clever approach to solving ...

5 månader ago

Solved


Birthday cake
It's Cody's 5th birthday, and you've been tasked with putting the candles on the cake. Your goal is to maximize the distance bet...

5 månader ago

Problem


Construct numbers from antidiagonals of stacks of binary numbers
A sequence is constructed in the following way: Express the numbers 1, 2, 3, 4, 5,… in binary and stack them, right-justified. T...

5 månader ago | 1 | 5 solvers

Solved


Roman to Integer Conversion
The idea behind this cody problem is to write a code that converts the Roman Numerals to Integers. A numeral system known as R...

5 månader ago

Solved


Convert Roman to Arabic Numerals
Based upon what I see on tv and at the movies, the use of Roman numerals indicates something is important or sophisticated (e.g....

5 månader ago

Problem


List lunar triangular numbers without duplication
Triangular numbers—which are the subject of Cody Problems 5, 291, 44289, 44732, 45833, 55680, 55695, and 55705—are the sums of c...

5 månader ago | 0 | 4 solvers

Solved


ベクトルを作成する
0 から n までのベクトルを 2 間隔で作成します。

5 månader ago

Solved


Bullseye Matrix with Zeros
Inspired by Problem 18, create a bullseye matrix with the addition of padding equal to 0 between concentric rings. Matrices are ...

5 månader ago

Solved


Design a well field in an infinite aquifer
A well field provides water for a community. The design of a well field involves a goal to meet a specified service demand (i.e...

5 månader ago

Solved


Palindrome vector
Check if a given vector is Palindrome. Example, [1 2 54 32 45 5 33 456 45 456 33 5 45 32 54 2 1]

5 månader ago

Solved


Sum of squares
Given a number n, return the sum of squares of all integers from 1 to n.

5 månader ago

Solved


Determine if a number is a cool number
A number is considered cool if it is 3 digits, has a 5 in it, and is divisible by 4.

5 månader ago

Solved


Palindrome String
Determine if the inputted string is a palindrome. That is, the string is the same forwards as it is backwards. For example: ...

5 månader ago

Solved


Biggest Value in the (Neighbor)Hood
For this challenge you get two inputs: a matrix A and an integer value n. Your function should return a Matrix B of the same siz...

5 månader ago

Solved


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

5 månader ago

Problem


Determine whether a number is a Zeisel number
Do you know what is interesting about the number 1729? That’s right: it’s the third Zeisel number, a number given by , where ...

5 månader ago | 1 | 4 solvers

Solved


Calculate the volume of the intersection of two balls
Consider two balls (solid spheres) in , with radius and respectively. Suppose that the distance between the centers of the two...

5 månader ago

Problem


Determine aquifer properties: steady pump test in confined or unconfined aquifers
Problem statement Write a function to determine the hydraulic conductivity and radius of influence using data from a steady p...

5 månader ago | 1 | 1 solver

Solved


Relative points in 2D: problem 3
The 2D pose of a robot, with respect to a world coordinate frame {O}, is described by a 3x3 homogenous transform matrix T. A la...

5 månader ago

Problem


Determine aquifer properties: steady pump test in a leaky confined aquifer
Problem statement Write a function to determine the hydraulic conductivity of a leaky confined aquifer and the hydraulic condu...

6 månader ago | 1 | 1 solver

Solved


Repeat a string (not a character array)
True string are a relatively recent addition to MATLAB, first having been available in R2016. Strings contrast with character ar...

6 månader ago

Solved


2D - Mean Filter
Assume you are given an "image" matrix of size NxM. Reduce the image noise by implementing a mean filter window of size 9 (a 3x3...

6 månader ago

Solved


Index of neighbor pixel with steepest gradient
Unlike in various applications, where the gradient of a two dimensional matrix is calculated in x and y direction, the gradient ...

6 månader ago

Solved


French Conundrum
The French army is trapped, sorrounded in backwards direction (South and West directions) by enemy traps and ambushes. You are n...

6 månader ago

Solved


The almost-birthday problem.
This is a harder version of the birthday problem. Now, you will have to determine the probability that two or more people in a r...

6 månader ago

Solved


Get ranking of a combination
I have the numbers pulled without replacement from the set [1 2 3 4 5 6 7 8 9 10 11 12 13]; They are then ordered from least to ...

6 månader ago

Solved


Retirement savings
At the start of what year will you have reached or exceeded a savings goal? Parameters (all are constant scalars given in a s...

6 månader ago

Solved


Recursive Standard Deviation
When you have a large set of data, it can be resource consuming to calculate standard deviation at every step. So why not calcul...

6 månader ago

Solved


Determine when snow started
R.P. Agnew posed the following problem: It starts snowing in the morning and continues steadily throughout the day. A snowplow t...

6 månader ago

Load more