Solved

Factorions: Numbers that equal the sum of the factorials of their digits

From Wikipedia: _A factorion is a natural number that equals the sum of the factorials of its decimal digits_ For example: ...

5 månader ago

Solved

DC-DC boost converter

Find the output voltage of a DC-DC boost converter when its input voltage is 12V and the duty cycle ratio is 0.6.

5 månader ago

Solved

Alternative Dimensions

Given a multidimensional matrix, transform the matrix so the dimensions are in the order given by variable ord. For example, giv...

5 månader ago

Solved

Implement a counter

Write a function that returns a function that counts the number of times it is invoked. Example: >> h = counter; >> h() ...

5 månader ago

Solved

MATLAB Counter

Write a function f = counter(x0,b) to construct a counter handle f that counts with an initial value x0 and a step size b. E...

5 månader ago

Solved

Change on Spiral Matrix

n>=3, generate a matrix of nth such that n^2 is the max number, and max number must be in [1,1] or [end, end]. One example will ...

5 månader ago

Solved

Write a function to calculate step size delta if bits per sample and input range is given for quantization.

numBit = bits per sample; range = input max value - min value; delta = step size; l = number of levels;

5 månader ago

Solved

How many ways to write a number

Given two positive numbers n and k, where n>=k. In how many ways can we write n as sum of k positive numbers. Same numbers but d...

5 månader ago

Solved

Calculate time taken by light to reach earth surface

We know the time(seconds) taken by light to reach surface of earth. What if the distance varies yearly or source of light moves ...

5 månader 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...

5 månader ago

Solved

Finding Perfect Squares

Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

5 månader ago

Solved

determine the sum of fraction part for given matrix

determine the sum of fraction part for given matrix a=1.8308 8.9172 6.7537 1.5853 10.2858 5.3804 6.5497 ...

5 månader ago

Solved

For given vectors x,y find coresponding spline coefficients.

For given vectors x,y find coresponding spline coefficients. Example x =[ -3 -2 0 2 3] y =[ 0 0 1 ...

5 månader ago

Solved

i forgot to use capital I

When referring to yourself you should write "I" (capital) and not "i". So correct the input string x, but be aware that other u...

5 månader ago

Solved

Calculate inverse matrix in m by n matrix

x=(1:10)' y=roundn(2*x+7*rand(size(x)),-1) a*x=y Estimate a using inverse matrix calculation. This is principle of li...

5 månader ago

Solved

Volume of a sphere given its surface area

You just measured its surface area, that is the input.

5 månader ago

Solved

Calculate correlation.

There are two data. y1=[0 1 2 3 4]' y2=[2 3 4 5 6]' We can see positive relationship between y1 and y2. The relations...

5 månader ago

Solved

Circumscribed circles

Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle. Example: [3 4 5] -> 2.5

5 månader ago

Solved

MATLAB Basic: rounding III

Do rounding towards minus infinity. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 8

5 månader ago

Solved

MATLAB Basic: rounding II

Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

5 månader ago

Solved

MATLAB Basic: rounding

Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

5 månader ago

Solved

Make a vector of prime numbers

Input(n) - length of vector with prime numbers Output(v) - vector of prime numbers Example: * n=1; v=2 * n=3; v=[2 3 5...

5 månader ago

Solved

Find the next prime number

Find the next prime number or numbers for given n. For example: n = 1; out = 2; or n = [5 7]; out = [7 11]; ...

5 månader ago

Solved

Neither minima nor maxima

Input v is a vector. Return all the elements of v which are not a local minimum or maximum. Example: v = [1 2 3 4 5] Ou...

5 månader ago

Solved

Circle/Pentagon Overlap

Your function will be provided with the five vertices of a pentagon (p) as well as the center point (cp) and radius (r) of a cir...

5 månader ago

Solved

Vector push

Append an element |x| to the end of the vector |v| and return both the extended vector and the new number of its elements. |x| c...

5 månader ago

Solved

I Plead the Fifth

Write a function to provide a yes or no answer to the input string. However, it must plead the 5th amendment (return an empty st...

5 månader ago