Community Profile # calvin son

Last seen: 2 dagen ago Active since 2022

#### Statistics

• • • • • • • #### Content Feed

View by

Solved

Approximation of Pi (vector inputs)
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

5 dagen ago

Solved

Vector pop
Take |n| elements from the end of the vector |v| and return both the shorten vector |v| and the |n| elements in a separate vecto...

5 dagen ago

Solved

Moving average (variable kernel length)
Find the moving average in a vector. The kernel length is a variable. For example x = 1:10 kernel_length = 2 would r...

5 dagen ago

Solved

We have data of matrix, that is input. That contains 2 or more rows and the last row should contain the average of each column,...

5 dagen ago

Solved

Calculate the hypotenuse of a right triangle without using ^ and sqrt ()
Find out the hypotenuse of right triangle. Say a = 4, b = 3 then c = 5 Please don't use ^ and sqrt() function.

5 dagen ago

Solved

Array ex-OR
There are in MATLAB logical functions such as _<http://www.mathworks.co.uk/help/matlab/ref/and.html and>,_ _<http://www.math...

5 dagen ago

Solved

Calculate cosine without cos(x)
Solve cos(x). The use of the function cos() and sin() is not allowed.

6 dagen ago

Solved

Calculate sin(x) without sin(x)
Calculate y = sin(x) x = 0 -> y= 0 without the use of sin(x) or cos(x)

6 dagen ago

Solved

Number of even divisors of a given number
Given a Number n, return the number of its even divisors without listing them. example: n=14 ; EvenDivisors={2,14} ; y=2 ...

7 dagen ago

Solved

Raise a polynomial to a power
In Matlab, polynomials are represented by a vector of coefficients. For example, the polynomial p=a*x^2 + b*x + c is represente...

7 dagen ago

Solved

Airline Ticket Mod7 Checksum
There are 13 digits in an airline ticket number. If an airline ticket number is valid, the 13th digit should be the remainder of...

7 dagen ago

Solved

Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.
Submit your answer to this problem a multiple of 5 seconds after the hour. Your answer is irrelevant; the only thing that matte...

7 dagen ago

Solved

Pentagonal Numbers
Your function will receive a lower and upper bound. It should return all pentagonal numbers within that inclusive range in ascen...

8 dagen ago

Solved

Hard limit function
Classify x data as if x>=0 then y=1 if x<0 then y=0 Example x = [ -2 -1 0 1 2] y = [ 0 0 1 1 1]

10 dagen ago

Solved

Polar Form Complex Number Entry
Write a function that takes the magnitude and angle(in degrees) of a complex number and returns a complex variable. Positive ang...

10 dagen ago

Solved

How many unique Pythagorean triples?
For a given integer |n|, return all <https://en.wikipedia.org/wiki/Pythagorean_triple Pythagorean triples> that inlude numbers s...

10 dagen ago

Solved

String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values
<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

12 dagen ago

Solved

Find the Pattern 8

12 dagen ago

Solved

Find the Pattern 7

12 dagen ago

Solved

Find the Pattern 6

12 dagen ago

Solved

Find the Pattern 5

12 dagen ago

Solved

Find the Pattern 4

12 dagen ago

Solved

Find the Pattern 2

12 dagen ago

Solved

Find the Pattern 9

12 dagen ago

Solved

What gear ratio does the cyclist need?
A cyclist (perhaps including our famed Codysolver the cyclist <http://www.mathworks.com/matlabcentral/cody/players/1841757-the...

12 dagen ago

Solved

Splitting Circle
Consider a circle which has been divided into three concentric circles as depicted in the figure below The ratio betwen the a...

12 dagen ago

Solved

Rotate input square matrix 90 degrees CCW without rot90
Rotate input matrix (which will be square) 90 degrees counter-clockwise without using rot90,flipud,fliplr, or flipdim (or eval)....

14 dagen ago

Solved

Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

14 dagen ago

Solved

Vector to 3-Column Matrix
Consider a vector *A* such as A = [1 2 3 3 4 5 6] Can you convert this vector to a three-column matrix like this: ...

14 dagen ago