Solved


Backgammon #3 - Display a Board Position
A previous problem in this occasional series (Problem 45967) set up a possible representation of a backgammon board: White ston...

1 month ago

Solved


Draw 'P' !!!
Draw a n by n matrix 'P' using 0s and 1s. (n is odd and greater than 4) if n=5 , then the output will be [1 1 1 1 1 1 0 0 0...

1 month ago

Solved


Determine whether a player solved a Cody problem
Write a function to determine whether a player has solved the specified Cody problems. The problem numbers are specified as a ve...

1 month ago

Solved


Evaluate Poker Hand
Given an input table of card values and card suits between five and thirteen cards, choose the best five cards and output the ra...

1 month ago

Solved


Solve an ODE: first-order linear equation
In the fall semester of [redacted], my professor for a course on ordinary differential equations said, “There are two groups of ...

1 month ago

Solved


Solve an ODE: nonlinear third-order equation
Write a function to solve the ordinary differential equation on the domain with , , and either or . The input variable ord ...

1 month ago

Solved


Check whether a Wordle guess is consistent with previous feedback
The game Wordle resembles the classic game Mastermind. Players try to guess a five-letter word, and after each guess they are to...

1 month ago

Solved


Secure Password
You are joining the MATLAB Central platform to solve a question on Cody. The signup page, requires you to input an id and a pass...

1 month ago

Solved


Easy Sequences 67: Project Euler Problem 1 - Not Again!!!
You know the drill... Given two integers and , with , find the sum of all positive integers below , that are multiples of any ...

1 month ago

Solved


Wordle
Wordle is an english game where you need to guess a 5 letter word. For each guess you'll receive a feedback for the placement of...

1 month ago

Solved


Determine Fundamental Solution of Pell Equation
Given, a positive value (d), determine the fundamental solution [x, y] of the Pell equation: x^2 - d*y^2 = 1. Provide character...

1 month ago

Solved


Time reverse indices
Time reverse the index values as follows IndexIn = [7 1 0] IndexOut = [7 6 0] Note that the indices are zero based and so...

1 month ago

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.

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

1 month 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,...

1 month 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) ...

1 month 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,...

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

1 month ago

Solved


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

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

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

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

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

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

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

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

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

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

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

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

1 month ago

Load more