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

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

3 years ago

Solved


Function composition
Write a function that accepts two function handles f and g and returns the composition h. That is, h = (f o g)(x) = f(g(x)) ...

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

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

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

3 years ago

Solved


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

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

3 years ago

Solved


Is this triangle right-angled (mixed sides)?
Implement function returning if triangle is right angled or not? Input argument is vector row with not ordered triangle sides. ...

3 years ago

Solved


Find the remainder - 01
Given an array of integers, find the remainder when the product of all the elements is divided by N

3 years ago

Solved


How many apples
You have x apples I take from you y apples now how many apples you have ?

3 years ago

Solved


Minimum Maximum Sort Array
sort one array by put minimum value followed by maximum as follow a=[2 3 1 5] and the solution is y=[1 5 2 3 3 2 5 1];

3 years ago

Solved


Polygon Interior Angle Sum
Given the number of sides of a regular polygon, find the sum of interior angles. Return 0 for input for which regular polygon a...

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

3 years ago

Solved


Easy Sequences 83: Digits of Powers of 3
This problem is a simpler version of 'Easy Sequences 82: Digits of Powers of 2'. Given integers and , we are asked to return th...

3 years ago

Solved


Easy Sequences 57: "Pretty-gorean" Triangles?
A positive integer is called a regular number, if and only if there exist a non-negative integer , such that . For some reason...

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

3 years ago

Solved


Counting Permutations
In the permutations of the numbers 1 to n, count the number of permutations in which exactly m elements are greater than the pre...

3 years ago

Solved


Determine flows of given probability using empirical frequency analysis
Write a function that takes as input observations of peak streamflow and exceedance probabilities expressed as percentages an...

3 years ago

Solved


Extract the prime numbers
Given a list of elements, extract the prime numbers from that array.

3 years ago

Solved


Find alternating sum
Given an array, find alternating sum i.e. – y = x (1) – x (2) + x (3) – x (4) + x (5) - …

3 years ago

Solved


Play with array Min-Max
An array is provided. For example, a= [ 2,1,11,4,5,13] Create an array from a like this way, out= [ 1,11,2,13,4,5] ➢ 1st take...

3 years ago

Solved


Given a matrix X, manipulate it accordingly
Given a matrix X, 1st add a column to the matrix whose elements are the summation of each rows. Then add a row to the matrix who...

3 years ago

Solved


An array is given. Find the unique elements of the array. [keep the sequence unchanged]
An array is given. Find the unique elements of the array. [keep the sequence unchanged] For example if input x=[2 ,4 , 9 ,2 ,...

3 years ago

Solved


An array is given that contains the marks received by a group of students in their class test. Find out the highest 3 marks received by the students?
An array is given that contains the marks received by a group of students in their class test. Find out the highest 3 marks rec...

3 years ago

Solved


Easy Sequences 91: Generalized McCarthy-91 Recursive Function
The McCarthy 91 function is a recursive function, defined by the computer scientist John McCarthy as a test case for formal veri...

3 years ago

Solved


Hermite Polynomials
Problem 1304 deals with Hermite polynomial of the physicist's type. In this problem, Return the n-th Hermite polynomial of the ...

3 years ago

Solved


Easy Sequences 84: Digits of Powers of 5
OEIS sequence #A008566, deals with the following series: This sequence is the digits of powers of 5 listed si...

3 years ago

Solved


Compute the area of the shoemaker’s knife
A shape resembling a shoemaker’s knife is constructed from a semicircle with diameter with two semicircular “bites” of diameter...

3 years ago

Load more