A résolu


Finding values in arrays
Assign numMatches with the number of elements in userValues that equal matchValue. Ex: If matchValue = 2 and userVals = [2, ...

plus de 9 ans il y a

A résolu


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

plus de 9 ans il y a

A résolu


Calculate the height of an object dropped from the sky
Assume that an object is dropped from 1000 meters above the surface of the earth at time t=0. The object is dropped such that t...

plus de 9 ans il y a

A résolu


Calculate distance travelled when given radius and rotations
When given radius of wheel and number of rotations calculate total distance travelled consider pi=3.14

plus de 9 ans il y a

A résolu


Matlab Basics - Pick out parts of a vector
Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...

plus de 9 ans il y a

A résolu


Writing a recursive math function
Complete the recursive function RaiseToPower(). Ex: If userBase is 2 and userExponent is 4, then raisedValue is assigned wit...

plus de 9 ans il y a

A résolu


Sum of diagonals elements of a matrix
Given a matrix, return the sum of all the elements across the diagonals. E.g. A = [1 2 3; 4 5 6; 7 8 9;...

plus de 9 ans il y a

A résolu


Number of pennies
Complete the function ConvertToPennies() so that the function returns the total number of pennies given a number of dollars and ...

plus de 9 ans il y a

A résolu


Populating an array with a for loop
Write a for loop to populate multiplicationTable with the multiples of baseValue from 0 to 5. Ex: If baseValue is 2, then mu...

plus de 9 ans il y a

A résolu


Matlab Basics II - Free Fall
An object freely falling from rest under gravity covers a distance x given by: x = 1/2 gt^2 write a function that calculat...

plus de 9 ans il y a

A soumis


FIR filters
FIR Low pass filters

plus de 9 ans il y a | 3 téléchargements |

4.0 / 5

A résolu


Count decimal digits of a number
* Given an integer number you have to return the number of its digits. * For example 248 has 3 digits and 1589 has 4 digits ...

plus de 9 ans il y a

Réponse apportée
Write a single line code to sum all the odd numbers of an array.
You can use this code: y = sum(x(rem(x,2)==1));

plus de 9 ans il y a | 9

| A accepté

A résolu


Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27

plus de 9 ans il y a

A résolu


Calculate the derivative of a polynomial
Example: in = [ 1 1 1 ] out = [ 2 1 ]

plus de 9 ans il y a

A résolu


kmph to mph converter
Convert the speed in miles/hour to km/hour.

plus de 9 ans il y a

Problème


kmph to mph converter
Convert the speed in miles/hour to km/hour.

plus de 9 ans il y a | 6 | 193 solveurs

A résolu


Add a row of zeros on top of a matrix
Given a matrix, insert a row of zeros as the top row.

plus de 9 ans il y a

A résolu


Writing a function: MaxValue()
Write a local function named MaxValue that returns the maximum of two inputs numA and numB.

plus de 9 ans il y a

A résolu


Function call: Kilometers to miles
Assign rateMPH with the corresponding rate in miles per hour given a user defined rateKPH, which is a rate in kilometers per hou...

plus de 9 ans il y a

A résolu


Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F. Examples: Input F = 90 Output C is 32.22 I...

plus de 9 ans il y a

A résolu


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

plus de 9 ans il y a

A résolu


Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

plus de 9 ans il y a

A résolu


Convert from Base 10 to base 5
Convert the input number from base 10 into base 5: for example: if a(in base 10)= 5 then a(in base 5)= 10

plus de 9 ans il y a

A résolu


The Dark Side of the Die
It is well-known that opposite sides of a classic hexahedral die add to 7. Given a vector of dice rolls, calculate the sum of th...

plus de 9 ans il y a

A résolu


Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

plus de 9 ans il y a

A résolu


Genetic markers test
Assign testResult with 1 if either geneticMarkerA is 1 or geneticMarkerB is 1. If geneticMarkerA and geneticMarkerB are both 1, ...

plus de 9 ans il y a

A résolu


Equality check: Number of bricks
Write an if statement that assigns deliveryComplete with 1 if bricksDelivered is equal to bricksExpected.

plus de 9 ans il y a

A résolu


Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

plus de 9 ans il y a

A résolu


Matlab Basics - Set unwated parts of a vector to zero
Consider a vector x, of length >= 7, write a script to set elements 2, 5, and 6 to zero. e.g. x = [1 2 3 4 5 6 7] --> x = [1 ...

plus de 9 ans il y a

Charger plus