Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

casi 10 años hace

Resuelto


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.

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


Celsius to Kelvin
Convert Celsius degrees to Kelvin temperature.

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Cargar más