Solved


Sample from random roulette
Given a list of values and their probabilities sample 10,000 values. Example: x = [1 2 3 4 5]; prob = [0.2 0.1 0.4 0.1 0.2] ...

4 years ago

Solved


Find the outlier in a set of samples
Given an array x of numbers. Assumed that this array has one outlier. Find the position p and the value v of the outlier in this...

4 years ago

Solved


Siren frequency and Doppler effect.
The Doppler effect is described on OpenStax University Physics at https://openstax.org/books/university-physics-volume-1/pages/1...

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

4 years ago

Solved


Cell Array Inception?
Jimmy is a beginning MATLAB student who is trying to read in a text file and build a cell array of strings, where A{k} is the kt...

4 years ago

Solved


Seperate array to small section according to its index position
Given a integer n, we can generate a sequence [0,1,2,3,4,..., 2^n-1], then we separate it to two sequence according to their ind...

4 years ago

Problem


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

4 years ago | 3 | 19 solvers

Solved


Get Cody's screen size
Return an object that helps this problem's test suite return Cody's screen size.

4 years ago

Solved


Lambert's W
Matlab cody does not support lambertw. Try to create a lambert's w function yourself. Lambert's W is the function that solves...

4 years ago

Solved


Rewrite setdiff to account for non-unique values
Setdiff(a,b) is a function that will remove all values of b from a. Sometimes, you need this function to do a little bit extra,...

4 years ago

Solved


stem and leaf plot
A stem-and-leaf display is a device for presenting quantitative data in a graphical format, similar to a histogram, to assist i...

4 years ago

Solved


Image Series 3 Complementary
Find the Complementary of image which is 8 bits gray scale image. Each pixel is converted to binary format in the image. A...

4 years ago

Solved


İmage Series 2 AND
Given two input first one is a number which is uint8, second one is image which is 8 bit gray scale image, the image has pixsels...

4 years ago

Solved


İmage Series 1 OR
Given two input first one is a number which is uint8, second one is image which is 8 bit gray scale image, the image has pixsels...

4 years ago

Solved


Divisible by 14
Write a function to determine if a number is divisible by 14. If a number is <http://www.mathworks.com/matlabcentral/cody/proble...

4 years ago

Solved


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

4 years ago

Solved


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

4 years ago

Solved


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

4 years ago

Solved


Adding and Subtracting UINT variables
Given UINT class variables output the correct solution to A-B+C. *Input:* A,B,C Three uint variables *Output:* solution ...

4 years ago

Solved


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

4 years ago

Solved


Fangs of a vampire number
A <http://en.wikipedia.org/wiki/Vampire_number vampire number> is a number v that is the product of two numbers x and y such tha...

4 years ago

Solved


Find the Final State of an Abelian Sandpile
Let us define an <http://nautil.us/issue/23/dominoes/the-amazing-autotuning-sandpile Abelian sand pile> as a matrix that is only...

4 years ago

Solved


Formatting currency numbers
Given a number, format it properly for textual display using the notation $xxx,xxx,xxx.xx. Assume that no more than two digits ...

4 years ago

Solved


The Tower of Hanoi
In the <http://en.wikipedia.org/wiki/Tower_of_Hanoi Tower of Hanoi problem> with 3 rods (1, 2 & 3), the goal is to move a tower ...

4 years ago

Solved


Magic Concentric Circles
Consider 4 magic circle circles around a single number in the sequence 1:n where the sum along the diameters is always equal, an...

4 years ago

Answered
using matrix as an input to solve the following equation
The beauty of MATLAB is, that when you run your code you will get a clear message which explicitly states what the error is. I...

4 years ago | 1

Solved


Bouncy numbers
Inspired by Project Euler n°112. Working from left-to-right if no digit is exceeded by the digit to its left it is called an ...

4 years ago

Answered
could anyone help me how to pair the numbers in the desired manner as shown below
This looks a quite a unique manner. Anyways, try this A=1:16; R = reshape(A,4,[]); [R(:,1)' R(:,2)'; flip(R(:,3))' flip(R(:,...

4 years ago | 1

| accepted

Solved


Find the standard deviation of an array
given an array, find it's standard deviation without using the std() function. Use sample formula (n-1) for standard deviation a...

4 years ago

Load more