Solved


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

meer dan 5 jaar ago

Solved


Find out phase angle of second order system.
Find out phase angle of second order system. In control system, phase angle is given by inverse of cos.

meer dan 5 jaar ago

Solved


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

meer dan 5 jaar ago

Solved


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

meer dan 5 jaar ago

Solved


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

meer dan 5 jaar ago

Solved


Multi-line comments
* Fix the syntax errors.

meer dan 5 jaar ago

Solved


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

meer dan 5 jaar ago

Solved


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

meer dan 5 jaar ago

Solved


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.

meer dan 5 jaar ago

Solved


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

meer dan 5 jaar ago

Solved


Comments
* Fix the syntax errors.

meer dan 5 jaar ago

Solved


Logic variables
* Assign isAvailable with true.

meer dan 5 jaar ago

Solved


Solve the Sudoku Row
*Description* A simple yet tedious task occurs near the end of most Sudoku-solving algorithms, computerized or manual. The ta...

meer dan 5 jaar ago

Solved


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

meer dan 5 jaar ago

Solved


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

meer dan 5 jaar ago

Solved


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

meer dan 5 jaar ago

Solved


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

meer dan 5 jaar ago

Solved


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

meer dan 5 jaar ago

Solved


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

meer dan 5 jaar ago

Solved


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

meer dan 5 jaar ago

Solved


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

meer dan 5 jaar ago

Solved


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

meer dan 5 jaar ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

meer dan 5 jaar ago

Solved


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

meer dan 5 jaar ago

Solved


Add two numbers
Given a and b, return the sum a+b in c.

meer dan 5 jaar ago

Solved


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

meer dan 5 jaar ago

Solved


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

meer dan 5 jaar ago

Solved


find distance between runs
Another question inspired by the <http://uk.mathworks.com/matlabcentral/answers/?s_tid=gn_mlc_an answers forum>: A vector of ...

meer dan 5 jaar ago