Solved


Simple spirometer - find your lung capacity from the number and size of soap bubbles in one breath
Assumed that each bubble has practically the same diameter d. Given total number n of bubbles. Find volume v of breath.

7 years ago

Solved


Basics: counting digits of a number irrespective of the sign
publish the number of digits in any input integer example: -23---->2

7 years ago

Solved


Get a new matrix by mapping each element of an arbitrary-sized input matrix using lookup table
A is a matrix of any size and dimension. Each element of matrix A belongs to the set S of natural numbers up to N. B is a vector...

7 years ago

Solved


convert the number to binary format & count digits
Convert the given number to the corresponding binary format and count the number of digits in that binary number

7 years ago

Solved


Construct an index vector from two input vectors in vectorized fashion
Create an index vector defined by two input vectors, one defining the beginnings of one or more index ranges, and the other defi...

7 years ago

Solved


Consecutive Equation Times (of the day)
Many times throughout the day can represent mathematical equations. In this problem, we focus on the largest consecutive run of ...

7 years ago

Solved


Equation Times (of the day)
Many times throughout the day can represent mathematical equations. In this problem, we focus on times that include the four bas...

7 years ago

Solved


Power Times (of the day)
Many times throughout the day can represent mathematical equations. In this problem, we focus on times that represent powers. Fo...

7 years ago

Solved


Big numbers, repeated least significant digits
This problem builds off of <http://www.mathworks.com/matlabcentral/cody/problems/3077-big-numbers-least-significant-digits/ Prob...

7 years ago

Solved


adding huge numbers
Write function called huge_add that adds together two positive integers of any length specified as char vectors using decimal n...

7 years ago

Solved


Expand a term
Given a term, as a string, expand it. e. g. f = '2(x + y)';

7 years ago

Solved


Explode string
Break a sentence into cell of words

7 years ago

Solved


Find the right x in a 1. order Polynomal (y = m*x+c)
Given two points in a Cartesian coordinate system, find the x-value, where polynomial of 1. order (y = m*x+c) is equal to a giv...

7 years ago

Solved


Remove Missing Values from a Table or an Array
Remove missing entries from an array or table. If A is a vector, then remove any entry that contains missing data. If A is a mat...

7 years ago

Solved


Send vector into a struct object
Construct a struct object that contains n fields named a1, a2, ..., an, and has values from a given input vector of length n.

7 years ago

Solved


struct2values()
Convert a struct object into a column vector. You can assume that the struct elements are scalars Example: a = struct();...

7 years ago

Solved


Weighted Convolution
Given two input vectors x = [x_1, x_2, ..., x_K] and y = [y_1, y_2, ..., y_K] of equal length, compute the weighted convolution ...

7 years ago

Solved


convert 2D array of ones and zeros to checkerboard array of [1,2] where the original array was ones and zero elsewhere
Given a 2D array of ones and zeros, generate an equivalent sized checkerboard array of ones and twos. The checkerboard pattern s...

7 years ago

Solved


Smallest n, for n! to have m trailing zero digits
For given positive integer n, its factorial often has many trailing zeros, in other words many factors of 10s. In order for n! t...

7 years ago

Solved


The number of trailing zero digit of a factorial
For given positive integer n, take factorial of that number. How many trailing zeros does it have? Example: factorial(11) = 3...

7 years ago

Solved


Create all combinations of vectors
This function exists in the Neural Network Toolbox but is not available in Cody. Can you write such a function? See <http://...

7 years ago

Solved


Repeat string n times - 3
function myOutput = rep_str_3(string1, string2, num1, num2, n) function desiredOutput = rep_str_3('string1', 'STRING2', 0...

7 years ago

Solved


Digital Neighbourhood
Given a natural number reorder its digits to create another number, closest to the given one. Examples: * 123 gives 132, ...

7 years ago

Solved


Pascal's triangle
<https://en.wikipedia.org/wiki/Pascal%27s_triangle> if the order is: x = 3; the output will be: output = [0 0 0 1 0 0 ...

7 years ago

Solved


Return ! if array element starts with a certain letter. Otherwise return ?
Input x=['try' 'once' 'more']; s='t' Output ans='!' Input x=['try' 'once' 'more']; s='O' Output ...

7 years ago

Solved


Return the sequence element II
Given positive integers x and n, return a positive integer, y, which is the nth term in the <https://en.wikipedia.org/wiki/Juggl...

7 years ago

Solved


Concatenated roots
Which is the value of this infinte concatenated roots? <<https://s27.postimg.org/i4hkin7xf/Code_Cogs_Eqn.gif>> Note: If ...

7 years ago

Solved


jumping astronauts
The surface gravity on the moon is approximately 2 m/s^2. Thats why an funny astronauts feels as light as a feather and jumps fr...

7 years ago

Solved


Hydrostatic Pressure
Given depth(height), in m, find the pressure under a body of water. Need to know the density of water(kg/m^3), and gravity(m/s^2...

7 years ago

Solved


Duration of a trip in minutes
Input is a string which includes the duration of a trip. Convert the duration to minutes. For example if the duration of a t...

7 years ago

Load more