Risolto


Show me the shape of your array
Write a function that determines the shape of the input array x: Return 'square' if x has the same number of rows and colum...

circa 2 mesi fa

Risolto


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

circa 2 mesi fa

Risolto


Only once: cleaning up your columns
We have a logical array (with ones and zeroes). It is simple: after processing every column may only contain a single true value...

circa 2 mesi fa

Risolto


MATLAB 101: Count the Evens
Write a MATLAB function that accepts an array of integers and returns the total count of even numbers present in the array. Note...

circa 2 mesi fa

Risolto


Draw 'W'
For any given n, return a matrix of height n and width 4n-3 containing a W of ones. Example: n=2 ans= [1 0 1 0 1 0 1 0 1 0...

circa 2 mesi fa

Risolto


Limiting Element Occurrences
You are given a list 'v' of numbers. This list may contain repeated numbers. Your objective is to create a new list that maintai...

circa 2 mesi fa

Risolto


Finding the Most Frequent Letter in a Text
You are given a text containing various English letters, digits and punctuation symbols. Your task is to find the most frequentl...

circa 2 mesi fa

Risolto


replace nan values iteratively.
replace nan values with the average of two neighbour non-nan value iteratively as follow; x = [2; 4; 6; nan; nan; nan; 10]; ...

circa 2 mesi fa

Risolto


Get the array of sum for three consecutive numbers in an array
Get the array of sum, for three consecutive numbers in an array. if Input 'x' does not have at-least 3 elements then 'y' shou...

circa 2 mesi fa

Risolto


Diagonal Cross Mandala
Generate an N×N matrix with diagonals highlighted to form an artistic X-shaped mandala pattern. e.g. N = 5; 1 0 0...

3 mesi fa

Risolto


Vertical Mirror Mandala
Create a symmetric left-right mirrored pattern in an N×N matrix to emulate mandala reflection symmetry. e.g. N = 5; ...

3 mesi fa

Risolto


Don't be mean. Be nice!
For this problem, you will be given a range of single digits R, and a separate number K. You job is to calculate the mean of al...

3 mesi fa

Risolto


Tricky timing
Write a function that takes between 0.5 seconds and 0.6 seconds to run.

3 mesi fa

Risolto


snake_case to CamelCase convention
The snake_case naming convention writes words in lowercase and separates them with underscores. In CamelCase convention, the fir...

3 mesi fa

Risolto


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 mesi fa

Risolto


Time reverse indices
Time reverse the index values as follows IndexIn = [7 1 0] IndexOut = [7 6 0] Note that the indices are zero based and so...

3 mesi fa

Risolto


Cryptography with A Square Matrix : Decoding
Previous Problem: Cryptography with A Square Matrix : Encoding Now decode a double vector to a (hopefully!) meaningful text. I...

3 mesi fa

Risolto


Back to basics 18 - justification
Covering some basic topics I haven't seen elsewhere on Cody. Given a string with extra spaces in front and/or in back, return...

3 mesi fa

Risolto


Create a random logical vector of N elements of which M are true.
Your task for tomorrow is to create a random binary (logical) vector of N elements of which M are true. For example: ran...

3 mesi fa

Risolto


Find a common edge
First input is T, a triplet list of indices. Second input is e = [e1 e2], a row vector, couple of indices (positive distinct int...

3 mesi fa

Risolto


Factor Digits
Check if a given number in an array of numbers is - Equidigital Number - A number that has the same number of digits as the num...

3 mesi fa

Risolto


Moving Movsum
Given a vector (x) and a window (y), calculate the sum s(k) corresponding to k-y(k)+1:k values of x %%Example 1 x = [1 2 3 4...

3 mesi fa

Risolto


Repeatitive Summation
Given numeric vectors x, a and b, perform the following operation - a represents a vector of numbers and b represents a vector ...

3 mesi fa

Risolto


Beam me up, Scotty!
It's the mid 22nd century. You, Montgomery Scott, are appointed the chief engineer of the Starship Enterprise. The Starship is...

3 mesi fa

Risolto


Matrix Transposition
Given a matrix and an index, perform matrix transposition as follows - Replace non-corner value of ith ring from outside, with...

3 mesi fa

Risolto


5-year Annedversaries
This is the Bonus Round problem for the 2025 Cody Contest. Attend the watch party on Friday, March 27 to see how 6 champions fro...

3 mesi fa

Risolto


Cricket - Represent Average in "Dulkars" and "Ses"
Sachin Tendulkar's Test average was 53.78. So if Tendulkar = 53.78, one dulkar = 5.378. Similarly, Roger Twose's average was 25....

3 mesi fa

Risolto


Cricket - Report the Result (Part II: Test Matches)
Given two scalar strings representing the scores for a test match, return a string reporting the result in the appropriate form:...

3 mesi fa

Risolto


Cricket - Is It LBW?
LBW has an unfair reputation as complicated. But if you've watched a third umpire referral, you'll know that it's just a logical...

4 mesi fa

Carica altro