已解决


Logical indexing: High scores
Row array gameScores contains all player scores. Construct a row array highScores than contains all player scores greater than 5...

10 years 前

已解决


Array resizing: Removing elements
* Remove elements 2, 4, and 6 from row array pendingTasks

10 years 前

已解决


Adding an element: Ticker tape
* Add stockPrice to the beginning of row array tickerTape

10 years 前

已解决


Variable sized row arrays
* Reverse the contents of row array mileMarkers

10 years 前

已解决


Linear-spaced points array
* Construct a row array plotPoints with 5 values that are spaced linearly from lowValue to highValue. Ex: If lowValue is 1 and ...

10 years 前

已解决


Relational operators: Guessing game
* Row array userGuess contains a sequence of user guesses. Assign correctGuess with true when myNumber is equal to the user gues...

10 years 前

已解决


Column arrays: Transpose a row array
* Construct a row array countValues with elements 1 to endValue, using the double colon operator. * Transpose countValues to re...

10 years 前

已解决


Constructing column arrays
* Construct a column array elevatorStops with values 2, 4, 5, 9, and 10

10 years 前

已解决


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

10 years 前

已解决


Comments
* Fix the syntax errors.

10 years 前

已解决


Multi-line comments
* Fix the syntax errors.

10 years 前

已解决


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

10 years 前

已解决


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

10 years 前

已解决


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

10 years 前

已解决


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

10 years 前

已解决


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

10 years 前

已解决


Circle area using pi
Write a statement that assigns circleArea with the circle's area given circleRadius. Use the built-in mathematical constant pi. ...

10 years 前

已解决


Compute total cost
A drink costs 2 dollars. A taco costs 3 dollars. Write a statement that assigns totalCost with the total meal cost given the num...

10 years 前

已解决


Logic variables
* Assign isAvailable with true.

10 years 前

已解决


Find Sign(Zero Crossing) Changes in Array
Example; A = [1 2 3 -3 -4 -1 -24 2 4 -1 -2 3 1]; ans; [1 2 0 -3 -4 -1 0 2 0 -1 ...

10 years 前

已解决


Toeplitz Matrix
For a given square matrix of order n-by-n check whether this is a Toeplitz matrix or not. Return true if it is.

10 years 前

已解决


The Matrix Construction
Given two input ,first one is CN (Column Number), Second one is Dim Can you produce such a matrix for example CN=6; Dim=2 ...

10 years 前

已解决


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

10 years 前

已解决


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

10 years 前

已解决


Test if a matrix is symmetric
Write a logical function that returns 1 if the input matrix is symmetric and 0 otherwise.

10 years 前

已回答
How to do this: Multivariate Interpolation with random data (non-gridded)
vq = griddata(x1,x2,y,x10,x20) hth, George Papazafeiropoulos

10 years 前 | 0

已回答
how to write the nonlinear constraints in fmincon
Define the constraint function as follows: function [C,Ceq]=confun(x) F1=... F2=... F3=... F4=... F5=... ...

10 years 前 | 1

| 已接受

已回答
I have n points (x ,y coordinates known) of two parallel lines (not perfect straight ) want to draw lines from first boundary points to second boundary with proper slope . Also want to find min & max distance between the lines.
BOUN1=[ 191 220 189 221 188 222 186 223 186 224 185 225 185 226 185 227 185 228 186 229 187 230 187 231 187 232 187 233 187 23...

11 years 前 | 0

已回答
How to solve linear and non linear equation system?
For 14 equations with 14 unknowns, try fsolve, or any other iterative solver (Newton-Raphson, Arc-Length, line search, etc...) ...

11 years 前 | 0

| 已接受

已回答
Defining a function (including vector dot product) for all the points in 3D
% data dx = 0.1; dy = 0.5; dz = 0.1; [x, y, z] = meshgrid( (1:100)*dx, (1:100)*dy, (1:100)*dz ); X = [x(:) y(:)...

11 years 前 | 0

加载更多