A résolu


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

presque 11 ans il y a

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


Diagonal & Anti-Diagonal Matrix: Easy
Create a matrix as shown below from "magic" square. For example: if input x=9;then use mgic(x) and create the matrix...

presque 11 ans il y a

A résolu


Vectorizing, too easy or too hard?
Please insert a . before any ^, * or / in the string. That's it!!

presque 11 ans il y a

A résolu


Create One Large Eye of size N x N Quickly?
*<http://en.wikipedia.org/wiki/Aye_(yes) Aye !!!>*

presque 11 ans il y a

A résolu


Array GCD
* Find Greatest Common Divisor in a given array * Function Template: function ans = arraygcd(a) % a=[45 15 200 ...

presque 11 ans il y a

A résolu


Vector LCM
* Find Least Common Multiple of a given vector. * Need general solution as the test suite will be expanded. * Function Templa...

presque 11 ans il y a

A résolu


How many jokers?
* Given DNA codes of a group of suspects, * and a code for certain types of jokers, * Count how many jokers of that type. * ...

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


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


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


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


While loop with multiple conditions
Write a while loop that multiplies userValue by 2 while userValue is not 10 and while userValue is less than 25.

presque 11 ans il y a

A résolu


While loop with branching
Write a while loop that adjusts userValue while userValue is less than 0 or greater than 80. If userValue is greater than 80, th...

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


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

presque 11 ans il y a

A résolu


Find max
Find the maximum value of a given vector or matrix.

presque 11 ans il y a

A résolu


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

presque 11 ans il y a

A résolu


Conic equation
A conic of revolution (around the |z| axis) can be defined by the equation s^2 – 2*R*z + (k+1)*z^2 = 0 where |s^2=x^2+y...

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


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

presque 11 ans il y a

A résolu


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

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


Small aircraft weight limit
Write an if-else statement that evaluates to true if the sum of passengerWeight and cargoWeight is less than or equal maxWeight....

presque 11 ans il y a

A résolu


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

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


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


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

presque 11 ans il y a

Charger plus