Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


"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) ...]...

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Mehr laden