Solved


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

10 years ago

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

10 years ago | 1 | 69 solvers

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 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

10 years ago

Solved


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

10 years ago

Solved


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

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

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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


To convolve two vectors
To convolve two vectors

10 years ago

Solved


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

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

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

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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


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

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

10 years ago

Load more