Solved


Find gradient of a numeric data which has same size as the existing vector.
**** Refer matlab documentation about finding gradient **** Convert the entire gradient vector to least integer form. (Probably...

1 month ago

Solved


Solve an ODE: draining tank
Write a function to compute the time to drain a cylindrical tank of diameter from an initial level to a level . The outflow oc...

1 month ago

Solved


Armstrong Number
Write a function name armstrong_check that checks whether the given input is an Armstrong Number or not. It returns logical True...

1 month ago

Solved


Zero finder
Write a function named 'zero_finder' that takes a matrix as input and returns the row index of the last zero for each for each c...

1 month ago

Solved


Easy Sequences 97: One-line Code Challenge - Sequence with Constant Difference
While answering Problem #57725, I noticed a pattern that immediately led me to a solution, namely: the -th difference of the seq...

1 month ago

Solved


Inscribe a circle in a triangle with a side of length equal to the circle’s circumference
A circle of radius is inscribed in a triangle with a side that has a length equal to the circle’s circumference. The center of ...

1 month ago

Solved


Number of images formed due to two inclined mirrors and their coordinates
There are two mirrors with angle theta between them and there is an object on x axis. Determine the number of images formed and ...

1 month ago

Solved


Determine whether a hydrograph is a unit hydrograph
A hydrograph describes the runoff response of a catchment or watershed to rainfall. It shows the runoff rate (or flow or discha...

1 month ago

Solved


Easy Sequences 101: One-line Code Challenge - n-th Digit of Fibonacci Sequence
For a given index , the -th Fibonacci number, is defined as: for or , and for . What this problem requires is find the dig...

1 month ago

Solved


Radius of an inner N-dimensional sphere
A hypercube is an N-dimensional analogue of a square (N=2). Similarly, an N-sphere is an N-dimensional analogue of a circle. Not...

1 month ago

Solved


Easy Sequences 100: One-line Code Challenge - 100th Digit of 100th power of an Integer
Given a integer , write a function that computes the digit of . If has less than digits just output a NaN. For example if , ...

1 month ago

Solved


Easy Sequences 99: One-line Code Challenge - Real Digitizer
Given a real number r, write the function rDigitizer that breaks r into constituent digits and symbols. For example: >> ...

1 month ago

Solved


Easy Sequences 98: One-line Code Challenge - Ternary Operator Function
Ternary operation is a standard construct in most computer languages. The ternary operator assigns value to a variable depending...

1 month ago

Solved


Sequence problem
find the nth term of the sequence: 790 1303 2033 ____ 4366 6095

1 month ago

Solved


Easy Sequences 96: One-line Code Challenge - Polynomial Folding Function
The Matlab fold function is a very useful functional programming construct. Unfortunatlely, fold is not available io Cody player...

1 month ago

Solved


The Yellowstone Permutation
The Yellowstone Permutation is a sequence of positive integers, defined by the following rules: No term is repeated. Given n t...

1 month ago

Solved


About jokes (and compression)
An argument can be made about jokes. The shorter they are, the funnier. Further explained here: https://en.wikipedia.org/wiki/Hu...

1 month ago

Solved


Repeat a string (not a character array)
True string are a relatively recent addition to MATLAB, first having been available in R2016. Strings contrast with character ar...

1 month ago

Solved


Easy Sequences 95: LCM Sums
For a given , write the function lcmSum(n), defined as follows: For example for : >> lcmSum = @(n) sum...

1 month ago

Solved


The rabbit problem
Suppose a newly-born pair of rabbits, one male, one female, are put in a field. Rabbits are able to mate at the age of one month...

1 month ago

Solved


Easy Sequences 94: GCD Sums
Given positive integer , write the function gSum(x), that sums all the GCD's of the integer pairs . For example in the Excel scr...

1 month ago

Solved


Compare a value to a vector
Given a random value X and a random vector Y. you have to compare X to the Vector Y and make a decision. case 1: X is a value i...

1 month ago

Solved


Easy Sequences 92: Number of Roots of a System of Linear Diophantine Equations
One of the tasks that Matlab is very good at, is in solving systems of linear equations. In this problem we shall tackle a sys...

1 month ago

Solved


Knight Moves?
One of my favorite games are chess. Let’s do something with chess. If you don’t know chess, that’s completely fine. You can stil...

1 month ago

Solved


Easy Sequences 93: Recursive Polynomial Function
For a natural number and a polynomial function , we define a recursive function , as follows: , and ...

1 month ago

Solved


Generate Hadamard Matrix without using hadamard function
In mathematics, a Hadamard matrix, named after the French mathematician Jacques Hadamard, is a square matrix whose entries are e...

1 month ago

Solved


Median filter over three values
Implement 1-D median filter over input vector x as described: Moving window size is 3 Output is middle/central value in moving...

1 month ago

Solved


Compute the average precipitation for a watershed using the Thiessen polygon method
Several methods are available for estimating the average precipitation for a watershed from a few observations at rain gauges. T...

1 month ago

Solved


Compute frequency factors for the normal distribution
In frequency analysis in hydrology, the streamflow corresponding to a specified exceedance probability (or return period ) can...

1 month ago

Load more