Solved


Generating random matrix with given probability mass function
Inspired by <http://www.mathworks.com/matlabcentral/cody/problems/2356-simulating-the-selection-of-a-state-with-given-probabilit...

10 years ago

Solved


N-th digit of Pi
Give the N-th digits of Pi Input = 1 => Output = '1' Input = 1:10 => Output = '1415926535' Input = [11:15 25:35] => Out...

10 years ago

Solved


Combined Ages 2 - Symmetric, n ≥ 3
Following on <http://www.mathworks.com/matlabcentral/cody/problems/42382-combined-ages-1-symmetric-n-3 Combined Ages 2>, you wil...

10 years ago

Solved


Faint Receipt
Suppose you have a receipt with some numbers that have been smudged or didn't print. In particular, the total amount is missing ...

10 years ago

Solved


Add two hex numbers
Add two hex numbers

10 years ago

Solved


Divisible by n, prime vs. composite divisors
In general, there are two types of divisibility checks; the first involves composite divisors and the second prime divisors, inc...

10 years ago

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

10 years ago

Solved


sum of digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 ...

10 years ago

Solved


sum of digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 ...

10 years ago

Solved


Define the operators of function_handles
Suppose f and g are function_handles, try to define f+g,f-g,f*g and f/g. e.g. if f = @(x)x and g = @(x)x+1 ...

10 years ago

Solved


replace empty matrices with '[]'
for example a=1;a(:,1)=[]; returns a = Empty matrix: 1-by-0 use this as the input,and the output should be '[]...

10 years ago

Solved


Is it column vector?
Is it column vector? Check vector for column vector without using iscolumn function.

10 years ago

Solved


Pancakes for everyone!
Accordingly to the <http://nl.mathworks.com/matlabcentral/cody/problems/42460-the-cake-is-a-lie problem 42460>. All the children...

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

10 years ago

Solved


combine cells
A cell type variable is created. However it has other cells in itself. we want to integrate them all in a single cell. the conte...

10 years ago

Solved


Create a fixed format text output
Given a short brief matrix, such as x = [1.2 2.4 3.6; 1.5 2.3 3.5; 1.35 2.35 3.65] and a label 13, create a fixed format text o...

10 years ago

Solved


Code Wheel
Create a function that offsets each value in a given string by a given amount. For instance, codewheel('hello',1) s...

10 years ago

Solved


Converter temp 0 to 200 degree C to 4 to 20mA
Converter temp 0 to 200 degree C to 4 to 20mA (It is used in transmitter)

10 years ago

Solved


The cake is a lie...
You're hosting a birthday party with a large number of screaming children. Fortunately, you have a gigantic sheet cake in front...

10 years ago

Solved


Go back n times
You will be given a column vector (such as x = [1; 2; 3; 4; 5; 6; 7; 8]). If (n=3) you will return following; [ 1 NaN NaN Na...

10 years ago

Solved


Make a full wave rectifier
Produce a full wave rectifier waveform for the given sine wave source. For a sine wave input, the output of the full wave rec...

10 years ago

Solved


Make a half wave rectifier
Produce a signal that outputs the given sine wave source when it is greater than zero and outputs zero when it is less than zero...

10 years ago

Solved


Calculate trends in time series
Create a new variable that has trends in input series. If _t+1_ is bigger than or equal to _t_, than trend in _t_ will be 1, oth...

10 years ago

Solved


Low level NaN
* I have a dataset. Columns represents different variables. * A variable may start with NaN or any double type number. * If i...

10 years ago

Solved


Repeat string n times - 2
This is the two variable version of <http://www.mathworks.com/matlabcentral/cody/problems/42482-repeat-string-n-times Repeat str...

10 years ago

Solved


Give prime Numbers upto n
You are given a input number x; print all the prime numbers less than equal to x.

10 years ago

Solved


Produce a cosine wave
Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/cosine-eqn.png>>

10 years ago

Solved


Produce a sine wave
Produce a sine wave with amplitude 3: <<http://blogs.mathworks.com/images/seth/cody/sine-eqn.png>>

10 years ago

Solved


Add offset to a signal
Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/add-offset-eqn.png>> You should see a downward...

10 years ago

Solved


Add a block to a model
Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/add-block-eqn.png>> In this case, the slope of...

10 years ago

Load more