Solved


Find the next state of a JK Flip-Flop
Find the next state (NS) of a JK Flip-Flop based on previous state (PS), inputs. Learn more about JK Flip-Flop theory here: ...

3 years ago

Solved


Ulam spiral 2: The revenge
Starting from the problem <https://www.mathworks.com/matlabcentral/cody/problems/2644-the-ulam-matrix>, transform the Ulam Matri...

3 years ago

Solved


Text processing - Help Johnny write a letter home from camp
Johnny overuses the word 'great'. Write a script that will help him with this and future letters. If a sentence contains more th...

3 years ago

Solved


all possible subsets of set
Given a vector, return all possible subsets of the vector in a cell array. Properties of basic set theory is assumed to be valid...

3 years ago

Solved


last n digit of a power function
Calculate the power of a given a base, exponent. Return the last n digit number. Example 1: base = 3; expo = 8; n = 3; ...

3 years ago

Solved


Fair Scoring for Cody
The length-based scoring system for Cody has a few well-known loopholes that allow clever programmers to hide complex code insid...

3 years ago

Solved


Simple Past of Regular Verbs
Given a regular verb, return the simple past. Example Input verb = 'to work' Output simple_past = 'worked'

3 years ago

Solved


Tribute to Ramanujan
The nth taxicab number, denoted as T(n), is defined as the smallest number that can be expressed as a sum of two positive algebr...

3 years ago

Solved


Alternately upper-lower case
Modify the string to alternate between upper and lower case. For example, s='achyuta' output='AcHyUtA' Update - Test case...

3 years ago

Solved


Create numeric palindromes and their square roots
Given a number n (1<=n<=9), return a left justified numeric matrix p with all the palindromes of the form 1 to n and back to 1. ...

3 years ago

Solved


remove nans fast
There are several ways to locate and remove nans in a matrix, and return an 1d row vector. In this problem the challenge is ...

3 years ago

Solved


Insert structure in a parameter-cell array.
When creating Matlab GUI elements, you can mix value pairs with structures in the list of input arguments, e.g. |uicontrol('t...

3 years ago

Solved


Check if it is a square or cube of consecutive numbers
Check whether the element of given row vector is a square or cube of consecutive numbers. For example Input x=[4 27 16 25 36 3...

3 years ago

Solved


Wrap a vector, but insert NaN's at the wrap-positions.
When you plot a line that wraps, and do not want the sawtooth shape to show up in the plot, you can either draw all separate lin...

3 years ago

Solved


Schrödinger dog
Everyone knows that dogs are less unpredictable than cats. But is that proven? Is that measurable at all? YES! NOW IT IS! ...

3 years ago

Solved


Reassign cell contents to empty variables, preserving cell content data type
Given a cell array C, return a cell array D with the following specifications: 1. D has the same size as the input C. 2. E...

3 years ago

Solved


Write a cubic formula function
Create a function that will output the three roots of a cubic equation specified by the 4 coefficients listed as input. The outp...

3 years ago

Solved


Get input and output variable names
Given a string representing a function header, return the variable names used for the inputs and outputs. For example if input ...

3 years ago

Solved


LIFO Validation
Write a function to check whether a LIFO (Last In First Out) restriction on inventory is violated. We have two input vectors ...

3 years ago

Solved


Fixed-Point Iteration
Perform fixed-point iteration to estimate the root of a nonlinear equation.

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

3 years ago

Solved


Create a v-notch vector without "sort" function
Given a vector vec, create a v-shaped vector as shown below: vec = [ 10 2 3 89 5 7 90 0 12] Output vector = [90 89 12 10 7 5 3 ...

3 years ago

Solved


Primes for Large N: 2^30, System Memory Limit
This Challenge is to further improve the "primes" function for speed/memory usage to the Limit of Cody Memory. The Matlab fun...

3 years ago

Solved


Primes Faster for Large N
This Challenge is to improve the "primes" function for speed. This may be accomplished by fixing memory usage. The Matlab fun...

3 years ago

Solved


Determine which fields have been modified in a structure
Given two input structures (s1, s2), determine which field values have been modified in s2 compared to s1. Your output should be...

3 years ago

Solved


Return elapsed time
Write a function that returns the amount of time it takes to run the function, as measured by tic and toc. Your answer must be c...

3 years ago

Solved


Pandiagonal Prime Magic Square Verification
Verify if an NxN matrix is a Pandiagonal Prime Magic Square. Required properties: 1) N^2 prime values ( No repeats, 1 ...

3 years ago

Solved


Find the minimum element of the matrix
Example: If x = [3 9; 5 2] then y = 2

3 years ago

Solved


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

3 years ago

Solved


Find the function
Given a set of point (x,y) and the coordinate x of a new point, find the y value of new point.

3 years ago

Load more