Gelöst


Find Missing Number
A little problem (inspired by CodeChef) for the coffee break. A friend give you an array of size n-1 integers and these int...

fast 11 Jahre vor

Gelöst


Permutations of input vector
Find and output all permutations of given vector

fast 11 Jahre vor

Problem


Find Missing Number
A little problem (inspired by CodeChef) for the coffee break. A friend give you an array of size n-1 integers and these int...

fast 11 Jahre vor | 1 | 69 Lösungsvorschläge

Gelöst


Find smallest number to leave a remainder of 1
given a vector of numbers, find the smallest number to be divisible by all of them with a remainder of 1. Note: input numbers wi...

fast 11 Jahre vor

Gelöst


Data Regularization
Provided is an m-by-n integer data matrix A whose elements are drawn arbitrarily from a set *S* = [1,2,3,...,S] for any large in...

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


Output a vector which is table of 9
Output a vector which is table of 9

fast 11 Jahre vor

Gelöst


Create sequnce 1 4 9 16 25.........
Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands

fast 11 Jahre vor

Gelöst


Musical Note Interval 1 - Diatonic Scale
Assuming a simple diatonic C scale, calculate the interval (integer) between two notes (provided as strings). By applying number...

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


GJam 2014 China Rd A: Rational Number Tree
This Challenge is derived from <http://code.google.com/codejam/contest/2924486/dashboard#s=p1 GJam 2014 China Rational Number Tr...

fast 11 Jahre vor

Gelöst


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

fast 11 Jahre vor

Gelöst


To convolve two vectors
To convolve two vectors

fast 11 Jahre vor

Gelöst


Xor of matrix
you have to set exclusive OR of two arrays

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


Double summation
Write two nested for loops to calculate the following double summation: <<https://drive.google.com/uc?id=0B74PAULDIwwsWFhlNTV...

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


Weighted Gold/Silver Standard
Building off of the <http://www.mathworks.com/matlabcentral/cody/problems/8045-gold-standard Gold Standard> and <http://www.math...

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Mehr laden