Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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.

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Problema


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

oltre 11 anni fa | 1 | 6 risolutori

Problema


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

oltre 11 anni fa | 2 | 55 risolutori

Risolto


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

oltre 11 anni fa

Risolto


Comments
* Fix the syntax errors.

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


Multi-line comments
* Fix the syntax errors.

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Carica altro