Risolto


Concatenating strings
* Write a statement that assigns fullName with firstName, a space, then lastName. Ex: If firstName is Alan and lastName is Tu...

circa 11 anni fa

Risolto


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

circa 11 anni fa

Risolto


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

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

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


Rule of mixtures (composites) - lower bound
The <http://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures> is used in the mechanical design of composite structures to...

oltre 11 anni fa

Risolto


Rule of mixtures (composites) - upper bound
The <http://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures> is used in the mechanical design of composite structures to...

oltre 11 anni fa

Risolto


Guess
A random number between 1 and 10 is created for the variable y. Guess what its value is.

oltre 11 anni fa

Risolto


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

oltre 11 anni fa

Risolto


Add 7
Given an input variable x, output a variable y that is 7 greater than x. Example: Input x = 1 Output y is 8 Input ...

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


Add 3
Given the variable x as an input, add three to the value, and put the result in y. Example: Input x = 2 Output y is 5...

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


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

oltre 11 anni fa

Risolto


Relational operators and row arrays: Run times
* Construct a row array fastRunTimes containing all elements of runTimes equal to or less than 480 seconds.

oltre 11 anni fa

Risolto


Comparing floating point values
* Assign matchFound with true if firstSample and secondSample within thresholdValue.

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


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


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


Union of two set decreasing order
Union of two set decreasing order Say, x=[1 2 5] and y=[5 7 8] then answer must be [8 7 5 2 1]

oltre 11 anni fa

Risolto


Find out magnitude of vector
Find out magnitude of vector. Say x=[1 2 3], then answer must sqrt(1^2+2^2+3^2) Please don't use sum function.

oltre 11 anni fa

Risolto


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

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


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


Comments
* Fix the syntax errors.

oltre 11 anni fa

Risolto


Find the mode of the given input
Find the statistical <http://en.wikipedia.org/wiki/Mode_(statistics)/ mode> of the given input. Example: If X is matr...

oltre 11 anni fa

Risolto


Wind outward from the center ...
Create an n-by-n matrix with elements ranging from 1 to n^2 in a rectangular spiral pattern. Example if n = 5 : 21 ...

oltre 11 anni fa

Carica altro