Solved


Brain Teaser Solver
Write an algorithm to solve this brain teaser: You have a square that is broken into four triangles, the area of three of tho...

5 years ago

Solved


Pattern Sum
Write a function which receives two single digit positive integers, (k and m) as parameters and calculates the total sum as: k...

5 years ago

Solved


Probability of red tulips (at both ends of a row)
I planted tulip bulbs in a row on my flower bed. I thought that I had planted white tulips all. However, later, it turned out t...

5 years ago

Solved


generate a matrix of Legendre polynomials
input = x - the degree of the polynomial output = matrix of Legendre polynomials

5 years ago

Solved


Find Excess 3 code of given decimal number.
Find Excess 3 code of given binary number. <http://en.wikipedia.org/wiki/Excess-3/ Excess-3> In XS-3, numbers are represe...

5 years ago

Solved


attenuation
A beam of X-rays propagates a length d(1) through a medium with an attenuation coefficient alpha(1). After that the beam propaga...

5 years ago

Solved


X O X Oh!
_This follows on from problem 44850 - X O X O_ <https://www.mathworks.com/matlabcentral/cody/problems/44850-x-o-x-o> On a...

5 years ago

Solved


Simple Caesar Cypher - shift encrypt a message given an index number
A Caesar cypher is a simple shift encryption method. Your goal is to create a function that allows a user to input a string and ...

5 years ago

Solved


Split a given string from the first instance of a given character
A simple operation to split a given string into two substrings at the point where the desired character is first found. e.g. ...

5 years ago

Solved


Create a 3D rotation matrix
Consider an arbitrary coordinate frame {A}. Consider another coordinate frame {B} which has the same origin as {A} but is rotat...

5 years ago

Solved


Make one vector from two others
You are given two vectors of equal length. Your task is to create a MATLAB script that will repeat all of the values in the fir...

5 years ago

Solved


Union Jack Matrix
Create a matrix of odd dimensions that has ones on both diagonals and dividing the matrix into 4 quadrants, resembling a square ...

5 years ago

Solved


Vandermonde Matrix
Create the Vandermonde Matrix of the given vector. The matrix consists of columns as powers of the vector, so the first column i...

5 years ago

Solved


The Deadly Sin
Melvyn and Banner are fighting over chocolates. Melvyn has X chocolates, while Banner has Y. Whoever has a lesser number of choc...

5 years ago

Solved


Reindex a vector (★★)
(copy of Prob. 676) You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX h...

5 years ago

Solved


String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values
<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

5 years ago

Solved


Change number representation to HEX
Given a number change it's representation to HEX and output it.

5 years ago

Solved


Quadratic equation
given three inputs (a, b, c) for the equation a*x^2+b*x+c=0; return 1 if the roots are complex (non zero imaginary), and 0 if th...

5 years ago

Solved


Create a New_Word
The output of the function is a new word created from the word entered into the function. The new word is created by deleting th...

5 years ago

Solved


prime to each other
Given two integers n1, n2 greater than 1, find out if they have common divisors or are prime to each other. Return "true" if the...

5 years ago

Solved


Matrix Construction I
Given n, construct a matrix as shown in the example below. Example For n=8, the output should look like this: 1 2 3 4 ...

5 years ago

Solved


Special Relativity 101.
Special relativity states that the effective mass of an object varies as a function of its velocity. If *c* is the speed of ligh...

5 years ago

Solved


Spot the First Occurrence of 5
This problem series invites you to solve two simple problems related to the integer NUMBER FIVE, in order to celebrate <https://...

5 years ago

Solved


Calculate Euler's phi function
Compute the Euler's phi function of a large integer. For more information about this topic please visit: <https://en.wikiped...

5 years ago

Solved


Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

5 years ago

Solved


"Low : High - Low : High - Turn around " -- Create a subindices vector
Let two vectors *lo* and *hi* be given. The job is to create a index vector like so idx = [lo(1):hi(1) lo(2):hi(2) ...]...

5 years ago

Solved


High school cafeteria
Given an input vector of positive integers, return a row vector with the primes first (in increasing order) and the composites n...

5 years ago

Solved


continuous compounding
what's the present value of having 100 dollars after n years given a continuously compounded rate i ? keep only 2 decimals pleas...

5 years ago

Solved


Matlab Basics II - Operations and Matrix Dimensions
Write a function that takes two inputs, a & b, and outputs the sum and product of the two matrices. The matrices have OPPOSITE d...

5 years ago

Solved


Matlab Basics II - Find the roots of a function
Write a function that finds where a curve crosses zero (the x-axis) to two decimal places Example: <<http://s14.postimg.o...

5 years ago

Load more