Solved


Sum of two number using (regexp, varargin) comand?
Sum two number a &b and get there result in c using the rexp and varargin comand.

2 months ago

Solved


Backgammon #5 - Valid Move?
A previous problem in this occasional series (Problem 45967) set up a possible representation of a backgammon board: White ston...

2 months ago

Solved


Find the summation, mean, median, mode and standard deviation of a given array.
An array is given. Find out the summation, mean, median, mode and standard deviation of a given array. If x=[1,2,2,3,3,3,4,4,4,...

2 months ago

Solved


Total resistance of a network of resistors in series and parallel
What is the total resistance of a network of resistors in series and in parallel? A matrix R contains the resistances (in Ohm) ...

2 months ago

Solved


Total resistance of resistors in parallel
What is the total resistance of a number of resistors in parallel? A vector R contains the resistances (in Ohm) of n resistors,...

2 months ago

Solved


Total resistance of resistors in series
What is the total resistance of a number of resistors in series? A vector R contains the resistances (in Ohm) of n resistors, w...

2 months ago

Solved


Multiply Large Hexadecimal Numbers
Multiply two large hexadecimal numbers together and output the hexadecimal representation of the result. For example: a='abcde...

2 months ago

Solved


Amazing circle of numbers 1 to n
For given natural number n, create amazing circle of numbers 1 to n without a repeat. This circle is that the sum of any two ad...

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

2 months ago

Solved


Collect a set of candy wrappers
This past Halloween, the siblings Matilda and Labrun amused (and sometimes confused) their many neighbors with their costumes in...

2 months ago

Solved


Poly2mask, drawpolygon or patch
Recently, I tried to plot a polygon in matlab, and I found there is a lot of embedded function that can be used. However, some f...

2 months ago

Solved


Undocumented MATLAB tricks No. 2 - Tell the parfor index
Your function is called in multiple for-loops, and the loop indices are given to your function. One of these indices are from a ...

2 months ago

Solved


Multiply binary numbers
Write a function to multiply two binary numbers input as strings. For example, input values of ‘1011’ and ‘101’ should give ’110...

2 months ago

Solved


Circular Segment Area
Let us consider a circle with radius . If we draw an angle (in radians) from the center of the circle, the two radii forming th...

2 months ago

Solved


Undocumented MATLAB tricks No. 1 - Save a function-returned struct
Often we face the case when we want to save a function-returned struct to a mat file with each of its field as individual variab...

2 months ago

Solved


Vector to Decimal
Given an integer vector , return its decimal representation as a character array. % Examples v = 7 x = '7' % v = [4 2] x...

2 months ago

Solved


Draw a x-by-x matrix British flag (Euro 2020)
Draw a x-by-x matrix 'British flag' using '0' and '1'.(x is odd and bigger than 4) x = 5 answer = [0 0 1 0 0 ...

2 months ago

Solved


Draw matrix 'Swiss flag'( Euro 2020)
Draw a x-by-x matrix 'Swiss flag' using '0' and '1'.(x is odd and bigger than 4) Example x=5 ...

2 months ago

Solved


tetration
About tetration.

2 months ago

Solved


ICFP2021 Hole-In-Wall: Solve Problem 4, Score=0, Bonus GLOBALIST assumed
The ICFP held its annual 3-day contest in July 2021 with Hole-In-Wall. Contest Specification. The contest folds the figure in R...

2 months ago

Solved


3n + 1 Problem (a.k.a The Collatz Conjecture)
The 3n + 1 problem (a.k.a The Collatz Conjecture) Consider the following algorithm to generate a sequence of numbers. Start wit...

2 months ago

Solved


Get to a number faster.
If you start with $1 and, with each move, you can either double your money or add another $1, what is the smallest number of mov...

2 months ago

Solved


Double Fibonacci
double_fibonacci takes two integers, each greater than one, as input arguments (it does not have to check the format of the inpu...

2 months ago

Solved


Cancel Middle
Write a function called cancel_middle that takes A, an n-by-m matrix, as an input where both n and m are odd numbers an...

2 months ago

Solved


Draw 'S'
draw S using nxn matrix, where n is odd and greater than 4 S = [1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 ...

2 months ago

Solved


ICFP2021 Hole-In-Wall: Solve Problem 47, Score=0, Figure Vertices 11, Hole Vertices 10
The ICFP held its annual 3-day contest in July 2021 with Hole-In-Wall. Contest Specification. The contest folds the figure in R...

2 months ago

Solved


ICFP2021 Hole-In-Wall: Solve Score=0, where number of Figure Vertices = Hole Vertices + 1
The ICFP held its annual 3-day contest in July 2021 with Hole-In-Wall. Contest Specification. The contest folds the figure in R...

2 months ago

Solved


ICFP2021 Hole-In-Wall: Solve Score=0, where number Hole Vertices = Figure Vertices
The ICFP held its annual 3-day contest in July 2021 with Hole-In-Wall. Contest Specification. The contest folds the figure in R...

2 months ago

Solved


ICFP2021 Hole-In-Wall: Figure Validation with Segment Crossing and Segment on Wall Checks
The ICFP held its annual 3-day contest in July 2021 with Hole-In-Wall. Contest Specification. The contest folds the figure in R...

2 months ago

Solved


ICFP2021 Hole-In-Wall: Figure Validation with Segment Crossing Check
The ICFP held its annual 3-day contest in July 2021 with Hole-In-Wall. Contest Specification. The contest folds the figure in R...

2 months ago

Load more