Solved

Counting the Grand Primes

A grand prime pair is a pair of primes, p1 and p2=p1+1000, such that both numbers are prime. Like a twin prime pair, where the d...

environ 3 ans ago

Solved

Look Up Mapping

Let the input is A = {[] [] [] [1] []}; B = {'A','B','C','D','E'}; Mapped Output = 'D';

environ 3 ans ago

Solved

Find the inverse permutation

Given a permutation vector perm (a vector of n elements containing all the elements from 1 to n in some order), return the permu...

environ 3 ans ago

Solved

Zero Cross

Can you write a function counts the number of times(n) a signal(x) crosses zero or changes sign. Example x=[1 2 -3 -4 5 ...

environ 3 ans ago

Solved

Knight's Tour Checker

Given a matrix a, determine whether or not a legal <http://en.wikipedia.org/wiki/Knight's_tour knight's tour> is present. The kn...

environ 3 ans ago

Solved

Replace values out of an interval with the lower or upper values

For a vector or matrix X and an interval [n1,n2], the function replace every element of x inferior to n1 by n1, and every elemen...

plus de 3 ans ago

Solved

"Power matrix" of two vectors

Given two row vectors x,y of lengths m and n (respectively), create an m x n matrix whose i,j entry is x(i)^y(j).

plus de 3 ans ago

Solved

Sum of logarithms

Given a vector, v, of real positive numbers, compute the sum, s, of the base-10 logarithms of the elements of v, without the use...

plus de 3 ans ago

Solved

Rearrange string

Input is a given string. Output is the number of ways to rearrange the string.

plus de 3 ans ago

Solved

Rolling maximums above a threshold

You are given either a vector or a 2-D matrix M and a threshold value of t. Write a script that will calculate how many times t...

plus de 3 ans ago

Solved

Approximate e

Given a and n, compute and approximation to f = a * e ^ n, without the use of exp, string operations, or floating point numbers....

plus de 3 ans ago

Solved

Create a Matrix of Zeros

Given an input x, create a square matrix y of zeros with x rows and x columns.

plus de 3 ans ago

Solved

Determine if input is divisible by three.

Given a positive integer, n, determine if n is divisible by 3. If yes, the function should output true. If no, false.

plus de 3 ans ago

Solved

Create sequnce 1 4 9 16 25.........

Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input

plus de 3 ans ago

Solved

Square a Number

Given an input x, return y, which is equal to the square of x.

plus de 3 ans 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...

plus de 3 ans 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...

plus de 3 ans ago

Solved

Times 3 problem

When you enter the number, it should return the number multiplied by 3

plus de 3 ans ago

Solved

Prime checker

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

plus de 3 ans 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 ...

plus de 3 ans 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. ...

plus de 3 ans ago

Solved

Luggage delivery

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

plus de 3 ans 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...

plus de 3 ans ago

Solved

Currency conversion

A currency exchange booth offers an exchange rate of 119.771 Japanese yen for 1 US dollar. The currency exchange booth rounds do...

plus de 3 ans ago

Solved

Determine the mean of matrix

Determine the mean of matrix without using mean function Hint: use simple algorithm

plus de 3 ans ago