Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


For loops: Savings account
The for loop calculates the amount of money in a savings account after numberYears given an initial balace of savingsBalance and...

alrededor de 11 años hace

Resuelto


While loop: Summation
Write a while loop that assigns summedValue with the sum of all values from 1 to userNum. Assume userNum is always greater than ...

alrededor de 11 años hace

Resuelto


For loops: Odds sum
Write a for loop that assigns summedValue with the sum of all odd values from 1 to userNum. Assume userNume is always greater th...

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


Prime checker
Complete the recursive function to determine if a number is prime. Skeletal code is provided in the PrimeChecker function.

alrededor de 11 años hace

Resuelto


Preset rpm speeds
A centrifuge has four preset speeds. Write a switch statement that assigns rpmSetting with the appropriate rpm speed given prese...

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


Food safety
Assign safeTemperature with 1 if foodTemperature is less than 40 or greater than 165.

alrededor de 11 años hace

Resuelto


Check bounds
Assign inRange with 1 if userWeight is greater than 100 and less than or equal to 200.

alrededor de 11 años hace

Resuelto


Bridge toll
Complete the example to calculate finalToll. The base toll for a bridge is baseToll. If the vehicle's weight is over 5,000 pound...

alrededor de 11 años hace

Resuelto


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

alrededor de 11 años hace

Resuelto


Multiple if statements
Write an if-statement that subtracts 5 from outputValue if amplitudeResponse is greater than 10. Write a second if-statement tha...

alrededor de 11 años hace

Resuelto


Assignment statements based on input value
Write an if-else statement that assigns finalValue with userValue + 5 if userValue is greater than 100. Otherwise assign finalVa...

alrededor de 11 años hace

Resuelto


Left Riemann numerical integration
A curve is represented by column arrays xCoordinate and yCoordinate. Approximate the integral from xCoordinate(1) to xCoordinate...

alrededor de 11 años hace

Resuelto


Forward difference approximation: Car temperatures
Column arrays measuredTemperature and sampleTime contain engine temperature measurement samples, and the time each sample was co...

alrededor de 11 años hace

Resuelto


Luggage delivery
Assign deliveryCost with the cost to deliver a piece of baggage weighing baggageWeight. The service charges twenty dollars for ...

alrededor de 11 años hace

Resuelto


Sum function: Counting cookies
Row array troopCookieSales contains the number of boxes of cookies sold by each troop member. Assign totalSales with the sum of ...

alrededor de 11 años hace

Resuelto


Health app
A health app records a user's weight and displays the change in weight from the previous measurement to the next. Assign weightC...

alrededor de 11 años hace

Resuelto


Currency conversion
A currency exchange booth offers an exchange rate of 119.771 Japanese yen for 1 US dollar. The currency exchange booth rounds do...

alrededor de 11 años hace

Resuelto


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

alrededor de 11 años hace

Resuelto


Sorting
Assume that x is an n-by-2 matrix. The aim is to return the first column of x, but sorted according to the second column. Exa...

alrededor de 11 años hace

Resuelto


Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

alrededor de 11 años hace

Resuelto


Perl 1: push
_This is part of a series of perl function which were very helpful for many perl programmers. Could you implement it in Matlab?_...

alrededor de 11 años hace

Resuelto


Rank of magic square (for beginners)
Compute the rank r of a magic square of order n WITHOUT rank and magic functions.

alrededor de 11 años hace

Resuelto


Replicate elements in vectors
Replicate each element of a row vector (with NaN) a constant number of times. Examples : n=2, A=[1 2 3] -> [1 1 2 2 3 3] n=0...

alrededor de 11 años hace

Resuelto


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

alrededor de 11 años hace

Resuelto


Find indices of diagonal elements
Given a matrix A and a diagonal index d (where 0 indicates the main diagonal and off-diagonals are identified by positive and n...

alrededor de 11 años hace

Cargar más