Risolto


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

quasi 10 anni fa

Risolto


Min of a Matrix
Return the minimum value in the given matrix.

quasi 10 anni fa

Risolto


Wrapping the Tower of Pisa
The famous artist Christo Vladimirov Javacheff, who likes pizza, wants to wrap the well-known Italian tower in paper. It is a ci...

quasi 10 anni fa

Risolto


Say something funny
Say something funny, or not. Your solution will be (fully automatically and objectively) scored based on how clever or funny ...

quasi 10 anni fa

Risolto


Return a list sorted by number of occurrences
Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

quasi 10 anni fa

Risolto


Extract leading non-zero digit
<http://en.wikipedia.org/wiki/Benford%27s_law Benford's Law> states that the distribution of leading digits is not random. This...

quasi 10 anni fa

Risolto


Pattern matching
Given a matrix, m-by-n, find all the rows that have the same "increase, decrease, or stay same" pattern going across the columns...

quasi 10 anni fa

Risolto


ASCII Code
Using matlab, give the symbol that is associated with ASCii code 90.

quasi 10 anni fa

Risolto


Write a code that will follow the equation y = x * (x + x) * x.
If x = 5, y = 5 * (5+5) * 5 = 250

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


Dosage by weight
A machine administer's medication dosage based on weight. Write an if-elseif-else statement that assigns the appropriate dosageA...

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


Insect population
An insect population doubles every generation. * Write a while loop that iterates numGeneration times. * Write a statment ...

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


Moving target
Write a function with persistent variables currentLocationX and currentLocationY that store an object's location. Each call to t...

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


Smallest and Largest Real Numbers
Complete the function by assigning minReal with the smallest positive double precision floating-point number, and maxReal with t...

quasi 10 anni fa

Risolto


Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

quasi 10 anni fa

Risolto


Area of a disk
Find the area of a disk or circle. x= radius of the disk.

quasi 10 anni fa

Risolto


Variable Assignment
Complete the ? part by assigning myExamScore with 100.

quasi 10 anni fa

Risolto


Matlab Basics - Logical Tests I
Write a script to test whether a year number is for a leap year or not. eg. x = 1884 output = 1 eg. x = 3 output = 0

quasi 10 anni fa

Risolto


Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

quasi 10 anni fa

Carica altro