Gelöst


Integer indexing array: Weekend box office
The row array movieBoxOffice stores the amount of money a movie makes (in millions of $) for the 7 days of a week, starting with...

mehr als 9 Jahre vor

Gelöst


Integer indexing array: Reverse subsets
Construct an indexing array copySubset so that the statement reversedOrder = origOrder(copySubset); results in a row array begin...

mehr als 9 Jahre vor

Gelöst


Integer indexing array: Shift left
Write a *single* statement that shifts row array attendanceValues one position to the left. The rightmost element in shiftedValu...

mehr als 9 Jahre vor

Gelöst


Double colon operator: Counting down
* Construct a row array countValues from startValue to endValue, elements decremented by -2 end Ex: If startValue is 10 and ...

mehr als 9 Jahre vor

Gelöst


Double colon operator: Increment by x
* Construct a row array countValues from 0 to 25, elements incremented by incrementValue. Ex: If incrementValue is 5, countVa...

mehr als 9 Jahre vor

Gelöst


Double colon operator: Counting up
* Construct a row array countValues from 1 to endValue, using the double colon operator. Ex: If endValue is 5, countValues s...

mehr als 9 Jahre vor

Gelöst


Indexing the array: Moving values
* Write three statements to shift the array contents 1 position to the left. * The rightmost element should be assigned -1.

mehr als 9 Jahre vor

Gelöst


Indexing an array element
* Assign currentStudent with the second element of array testScores.

mehr als 9 Jahre vor

Gelöst


Arithmetic array operations
* Add x to each element of array temperatureReadings.

mehr als 9 Jahre vor

Gelöst


Construct an array
* Construct an array named observedValues with elements sensorReading1, sensorReading2, and sensorReading3.

mehr als 9 Jahre vor

Gelöst


Numbers spiral diagonals (Part 2)
Inspired by Project Euler n°28 and 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the righ...

mehr als 9 Jahre vor

Gelöst


Spherical radius given four points
Determine the radius of a sphere provided four non-coplanar points on the surface of the sphere. pts = [x1 y1 z1; x...

mehr als 9 Jahre vor

Gelöst


Pi Estimate 2
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation2.pdf>

mehr als 9 Jahre vor

Gelöst


last n digit of a power function
Calculate the power of a given a base, exponent. Return the last n digit number. Example 1: base = 3; expo = 8; n = 3; ...

mehr als 9 Jahre vor

Gelöst


Given the name from the legend, return the handle
Write a function that will return the handle to the desired object. The input for this function will be a string which represent...

mehr als 9 Jahre vor

Gelöst


Differential equations I
Given a function handle |f| an initial condition |y0| and a final time |tf|, solve numerically the differential equation dy...

mehr als 9 Jahre vor

Gelöst


Geometry: Find Circle given 3 Non-Colinear Points
*This Challenge is to determine the center and radius of a circle given three non-colinear points.* *Input:* Points *Outpu...

mehr als 9 Jahre vor

Gelöst


Graph Algorithms 3: Number of Connected Components
Given an adjacency matrix of a simple undirected graph, find the number of connected components.

mehr als 9 Jahre vor

Gelöst


Clockwise or Counterclockwise
Given a list of 2-d points defining the vertices of a polygon, determine whether these points are sorted clockwise. The input...

mehr als 9 Jahre vor

Problem


Construct a precedence graph from a code segment
A hypothetical MATLAB code segment containing n lines is given in the form of a cell array. The i-th cell contains the i-th line...

mehr als 9 Jahre vor | 1 | 4 Lösungsvorschläge

Problem


Graph Algorithms 3: Number of Connected Components
Given an adjacency matrix of a simple undirected graph, find the number of connected components.

mehr als 9 Jahre vor | 2 | 23 Lösungsvorschläge

Gelöst


Pandigital Factors (Based on Euler 491)
A Pandigital Number is a number containing all of the digits from 0-9 inclusive, with the added stipulation that it does not hav...

mehr als 9 Jahre vor

Gelöst


Comments
* Fix the syntax errors.

mehr als 9 Jahre vor

Gelöst


Function definition: Double down.
* Complete the DoubleDown function to return twice the initialValue.

mehr als 9 Jahre vor

Gelöst


Multi-line comments
* Fix the syntax errors.

mehr als 9 Jahre vor

Gelöst


Function definition: Volume of a pyramid
Define a function CalculatePyramidVolume with inputs baseLength, baseWidth, and pyramidHeight. The function returns pyramidVolum...

mehr als 9 Jahre vor

Gelöst


Tree Height
Assign treeHeight with the tree height given the shadow length and angle of elevation. Simple geometry can compute the heigh...

mehr als 9 Jahre vor

Gelöst


Function call in expression: Reduced pricing.
Write a single statement that assigns cartTotal with the discounted cost of items 1 and 2. Function DiscountedPrice will return ...

mehr als 9 Jahre vor

Gelöst


Population growth
Assign finalPopulation with the population size given an initial population, population growth rate, and number of years. The po...

mehr als 9 Jahre vor

Gelöst


Coordinate geometry
Assign pointsDistance with the distance between point (x1, y1) and point (x2, y2). The distance is calculated by: Distance =...

mehr als 9 Jahre vor

Mehr laden