Solved

Mongean Shuffle

A Mongean shuffle of an n card deck starts with putting the initial deck on the left hand side. * The top card of the deck is...

4 years ago

Solved

N-Dimensional Array Slice

Given an N-dimensional array, _A_, an index, _I_, and a dimension, _d_, return the _I_ th elements of _A_ in the _d_ dimension. ...

4 years ago

Solved

Create sequnce 1 4 9 16 25.........

Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input

5 years ago

Solved

UICBioE240 problem 1.2

Convert a column vector into a row vector. So if A = [1; 2; 3] Then B = [ 1 2 3]

5 years ago

Solved

Modify an array's elements using other elements

Write a for loop that sets each array element in bonusScores to the sum of itself and the next element, except for the last elem...

5 years ago

Solved

Matrix of almost all zeros, except for main diagonal

Write a program to input an integer n and build a n-by-n matrix with the numbers 1,2,...,n on the main diagonal and zeros elsewh...

5 years ago

Solved

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

5 years ago

Solved

Modify an array's elements

Write a for loop that iterates from 1 to numberSamples to double any element's value in dataSamples that is less than minValue. ...

5 years ago

Solved

Writing a nested function: BMI calculation

Write a nested function CalculateBMI that assigns bmiValue given a user's weight and height. Use the following equations to calc...

5 years ago

Solved

Times 3 problem

When you enter the number, it should return the number multiplied by 3

5 years ago

Solved

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

5 years ago

Solved

Prime checker

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

5 years ago

Solved

Is this number Munchhausen Narcissistic?

In this problem, simply return 1 if a supplied number is Munchhausen narcissistic or 0 if not. Example 153 is narcissistic...

5 years ago

Solved

Luggage delivery

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

5 years ago

Solved

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

5 years ago

Solved

Compute change

A cashier distributes change using the maximum number of five dollar bills, followed by one dollar bills. Given amountToChange, ...

5 years ago

Solved

Travel speed

Write an anonymous function to compute the Euclidean distance given two points (x1, y1) and (x2, y2). Use the following equation...

5 years ago

Solved

Determine the mean of matrix

Determine the mean of matrix without using mean function Hint: use simple algorithm

5 years ago

Solved

Finding values in arrays

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

5 years ago

Solved

Number of pennies

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

5 years ago

Solved

Writing a recursive math function

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

5 years ago

Solved

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

5 years ago

Solved

Multiply by 3

Given the variable x as your input, multiply it by three and put the result in y.

5 years ago

Solved

Writing a function: MaxValue()

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

5 years ago

Solved

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

5 years ago

Solved

Convert letters to Greek letter

Write a switch statement that checks origLetter. If origLetter is 'a' or 'A', assign greekLetter with 'Alpha'. If origLetter is ...

5 years ago

Solved

Genetic markers test

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

5 years ago

Solved

Writing a while loop

Write a while loop that continues to increment userValue by 5 until userValue is less than 0.

5 years ago

Solved

Equality check: Number of bricks

Write an if statement that assigns deliveryComplete with 1 if bricksDelivered is equal to bricksExpected.

5 years ago