I study in Mechanical Engineering and want to improve my skill in MATLAB.

Solved

Indexing an array element

* Assign currentStudent with the second element of array testScores. _Reminder: Array indexing starts with 1._

5 years ago

Solved

Logical indexing: Player scores

Player 1 and player 2 take turns playing a game. Row array gameScores contains the scores of player 1, then player 2, then playe...

5 years ago

Solved

Binary numbers

Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

5 years 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 attendanceV...

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

5 years ago

Solved

Construct an array

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

5 years ago

Solved

Back to basics 10 - Max Float

Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...

5 years ago

Solved

Back to basics 11 - Max Integer

Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

5 years ago

Solved

Extract leading non-zero digit

<http://en.wikipedia.org/wiki/Benford%27s_law Benford's Law> states that the distribution of leading digits is not random. This...

5 years ago

Solved

Making change

Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

5 years ago

Solved

De-dupe

Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

5 years ago

Solved

Logical operators and arrays: 3-input and truth table

Given 3 inputs (inputA, inputB, inputC), assign threeInputAnd with the truth table outcomes for a 3 variable logical-and operati...

5 years ago

Solved

sum of non-primes

The sum of the non-primes below 10 is 1+4+6+8+9+10=38 Find the sum of all the non-primes below the input, N.

5 years ago

Solved

Population growth

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

5 years ago

Solved

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

5 years ago

Solved

Indexing the last element: Print queue

* Delete the last element of row array printQueue.

5 years ago

Solved

Remove DC

Input x is the sampled signal vector, may have both AC and DC components. Output y should not contain any DC component. Examp...

5 years ago

Solved

Function definition: Double down.

* Complete the DoubleDown function to return twice the initialValue.

5 years ago

Solved

Number of 1s in the Binary Representation of a Number

*Description* Return the number of 1s in the (unsigned integer) binary representation of a number. This function should be ab...

5 years ago

Solved

Accessing elements on the diagonal

Access the diagonal elements of a matrix without 'diag' function

5 years ago

Solved

Replace every 3rd element in a vector with 4

x is a vector of undetermined length You are to replace every 3rd element with the number 4, example: x = [11 23 34 43 2 3...

5 years ago

Solved

Vector Magnitude Calculator

'a' is a vector that starts at the origin and ends at (x, y). Find ||a||. Hint: It is as simple as "ABC".

5 years ago

Solved

Simple equation: Annual salary

Given an hourly wage, compute an annual salary by multiplying the hourly wage times 40 and times 50, because annualSalary = hour...

5 years ago

Solved

Write an expression

Assigns finalResult with firstSample plus secondSample, squared, then divided by 3. Ex: If firstSample is 18 and secondSample is...

5 years ago

Solved

Sums with Excluded Digits

Add all the integers from 1 to n in which the digit m does not appear. m will always be a single digit integer from 0 to 9. no...

5 years ago

Solved

How many solutions has this problem?

Guess, predict or calculate :-) (You will be scored by the accuracy). Update: <http://www.mathworks.co.uk/matlabcent...

5 years ago

Solved

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

5 years ago

Solved

Find the gcm of n given values

Create a function that given n integer values greater than zero, finds the two numbers with the greatest common divisor and retu...

5 years ago