A résolu


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

presque 11 ans il y a

Problème


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

presque 11 ans il y a | 1 | 69 solveurs

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


To convolve two vectors
To convolve two vectors

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

Charger plus