Risolto


Deleting an element in a matrix
For vector Grades=[98 56 78 34 100 88 87], delete the number 78 to get the following matrix Grades=[98 56 34 100 88 87] **re...

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

quasi 8 anni fa

Risolto


Comparing floating point values
* Assign matchFound with true if firstSample and secondSample are less than thresholdValue.

quasi 8 anni fa

Risolto


Evaluating a polynomial
Given the following polynomial and the value for x, determine y. y = 3x^5 – x^3 + 8x – 3 Example x = 1 y = 3 - 1 +...

quasi 8 anni fa

Risolto


Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

quasi 8 anni fa

Risolto


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

quasi 8 anni fa

Risolto


Create a two dimensional zero matrix
You have to create a zero matrix of size (mxn) whose inputs are m and n and the elements of your matrix should be zeros. Exam...

quasi 8 anni fa

Risolto


Vectors counting by 2
Create a vector numbers from 7 to 15 in increments of 2

quasi 8 anni fa

Risolto


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

quasi 8 anni fa

Risolto


Complex number
For complex number c=a+bi, write code that will add a and b together.

quasi 8 anni fa

Risolto


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

quasi 8 anni fa

Risolto


Squaring Matrix
Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

quasi 8 anni fa

Risolto


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

quasi 8 anni fa

Risolto


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

quasi 8 anni fa

Risolto


While loop with multiple conditions
Write a while loop that multiplies userValue by 2 while userValue is not 10 and while userValue is less than 25.

quasi 8 anni fa

Risolto


Remainder
Make 'y' equal to the remainder of 27 divided by 5. When x=27 and t=5

quasi 8 anni fa

Risolto


While loop with branching
Write a while loop that adjusts userValue while userValue is less than 0 or greater than 80. If userValue is greater than 80, th...

quasi 8 anni fa

Risolto


Celsius to Kelvin
Convert Celsius degrees to Kelvin temperature.

quasi 8 anni fa

Risolto


Rounding
Round 10.67 and make 'y' equal to that number.

quasi 8 anni fa

Risolto


length of a vector
Find twice the length of a given vector.

quasi 8 anni fa

Risolto


Function definition: BMI calculator
Define a function CalculateBMI with inputs massKg and heightCm. The function returns bodyMassIndex. The function should be able ...

quasi 8 anni fa

Risolto


Logical operators: Flipping bits
The xor operator will toggle the bit if the bit is xored with 1. Ex: 1 XOR 0 = 1, 1 XOR 1 = 0. The xor operator will retain th...

quasi 8 anni fa

Risolto


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

quasi 8 anni fa

Risolto


Constructing strings
* Construct a string alphaString from 'a' to endLetter, using the double colon operator. Ex: If endLetter = 'e', then alphaSt...

quasi 8 anni fa

Risolto


Logical variables: Running late?
* Assign onTime with true if noTraffic is true and gasEmpty is false.

quasi 8 anni fa

Risolto


Indexing the array: Shift right with variable sized arrays
* Write a statement to shift the array contents 1 position to the left. * Assign the rightmost element with -1. Ex: [12, 85...

quasi 8 anni fa

Risolto


Nth root.
* Assign outValues with the nth root of the inValues, the root is specified by rootValue

quasi 8 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. Ex: If runTimes =...

quasi 8 anni fa

Risolto


Multiple element-wise operations: Percent change
Row arrays sales2013 and sales2014 reflect the quarterly sales (in millions) of a popular potato chip company. Write a statement...

quasi 8 anni fa

Risolto


Extracting data: Heart rate (pulse)
The resting heart rate for an average adult is 60 - 100 beats per minute. Assign row array heartExtracted with all values in row...

quasi 8 anni fa

Carica altro