Risolto


Matlab Basics II - Velocity of a particle
A particle is moving in space, such that it's velocity is given by: <<http://s30.postimg.org/5rf1xtvj5/cody1.png>> write a...

oltre un anno fa

Risolto


Continuous NaNs - I
Remove any continuous NaNs that appear in the array - %Example 1 input = [1 NaN 2 NaN NaN 3 NaN NaN NaN] output = [1 NaN 2 ...

oltre un anno fa

Risolto


Simple date to serial no. conversion
Convert a date string to a serial date number. For example if you take x='19-May-2001' then the result is 730990 x...

oltre un anno fa

Risolto


Find the elements of a matrix according to a defined property.
From A = [5,2,3] and B = [1,2,3,4,5,6,7,8,9,10] produce a vector C where : C(1) is the sum of the first A(1) elements of B, ...

oltre un anno fa

Risolto


Secure Password
You are joining the MATLAB Central platform to solve a question on Cody. The signup page, requires you to input an id and a pass...

oltre un anno fa

Risolto


Happy Free Wednesday!
Just submit your solution on any Wednesday. *Related Challenges:* # Happy Free Wednesday! # Happy Free 2019! # Happy Fr...

oltre un anno fa

Risolto


Sequence Vectorization - I
Given a Natural number N, return the sequence - [1 1 2 1 2 3 1 2 3 4 ... 1 2 3 ... N-3 N-2 N-1 N] i.e. the horizontal concatenat...

oltre un anno fa

Risolto


A sequence of Ones
You are given number(s) with all digits - 1. Your answer will depend on the count of 1 in the given number, for example - x1...

oltre un anno fa

Risolto


Local Extrema
Given a 2D (m,n>1) matrix, replace an element if it is not a local extrema (minima/maxima), with 0 (zero). The comparison crite...

oltre un anno fa

Risolto


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

oltre un anno fa

Risolto


Sub-Diagonal Sum
Given a (m x n) matrix and a value r {1,-1}, change every element to the sum of the diagonal led by the element. r=1 > regular ...

oltre un anno fa

Risolto


Cubic Integer Constrained Solution
Find an integral non-trivial solution (x,y,z ~=0) (x=0 or y=0 or z=0 are trivial) for the cubic equation 987,654,321x + 123,45...

oltre un anno fa

Risolto


Construct a string from letters and counts
Given two input arrays like this: [5,3,1] ['a','b','c'] Output a string that contains each letter the specified num...

oltre un anno fa

Risolto


Polybius Square
Given a string, calculate the coordinates. Input will be always in lowercase. If string is a sentence then use 0 (zero) to indic...

oltre un anno fa

Risolto


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

oltre un anno fa

Risolto


Choose group with people
How many ways can you choose n groups of n people from n^2 people, assuming the groups are distinct? The number of people is gi...

oltre un anno fa

Risolto


How many ways to write a number
Given two positive numbers n and k, where n>=k. In how many ways can we write n as sum of k positive numbers. Same numbers but d...

oltre un anno fa

Risolto


Rearrange string
Input is a given string. Output is the number of ways to rearrange the string.

oltre un anno fa

Risolto


Permutation
How many different words can be formed using all the letters(together) from a given input word? Input is a string.

oltre un anno fa

Risolto


Divisible by 8
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

oltre un anno fa

Risolto


Divisible by 16
Write a function to determine if a number is divisible by 16. This can be done by a few different methods. Here are two: # If...

oltre un anno fa

Risolto


Vector push
Append an element |x| to the end of the vector |v| and return both the extended vector and the new number of its elements. |x| c...

oltre un anno fa

Risolto


A Simple Tide Gauge with MATLAB
*&#8767 &#8767 &#8767 &#8767 &#8767 &#8767 &#8767 &#8767* You are standing in a few inches of sea water on a beach. You a...

oltre un anno fa

Risolto


Inscribed Pentagon?
Your function will be provided with the five vertices of a pentagon (p) as well as the center point (cp) and radius (r) of a cir...

oltre un anno fa

Risolto


Split bread like the Pharaohs - Egyptian fractions and greedy algorithm
How would you split 5 loaves of bread among 8 people in all fairness? Get a hint from the Pharaohs. 5/8 = 4/8 + 1/8 , i.e. each ...

oltre un anno fa

Risolto


Hilbert numbers
Given a positive integer, n, return h as follows: 1. If n is not a <https://en.wikipedia.org/wiki/Hilbert_number Hilbert numb...

oltre un anno fa

Risolto


Number construction I
Given a positive integer, n, return a, b, c and d, such that 1. n = a*sqrt(b)+c*sqrt(d) 2. a, b, c and d are all positive ...

oltre un anno fa

Risolto


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

oltre un anno fa

Risolto


List the cuban primes
The number 61 is a cuban prime because it is prime and the difference two cubes, 64 and 125. Write a function to list the cuba...

oltre un anno fa

Risolto


Determine whether a number is a Blum integer
A Blum integer is a semiprime—that is, the product of two distinct primes—whose factors have the form for some integer . The nu...

oltre un anno fa

Carica altro