Gelöst


Armstrong Number
Determine whether the given input n-digit number is Armstrong Number or not. Return True if it is an Armstrong Number. An n-D...

mehr als 6 Jahre vor

Gelöst


Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

mehr als 6 Jahre vor

Gelöst


square root
Find the square root (y) of an input (x).

mehr als 6 Jahre vor

Gelöst


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

mehr als 6 Jahre vor

Gelöst


find the surface area of a cube
given cube side length x, find the surface area of the cube, set it equal to y

mehr als 6 Jahre vor

Gelöst


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

mehr als 6 Jahre vor

Gelöst


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

mehr als 6 Jahre vor

Gelöst


Reference Index Number
Given a reference set R of elements (each unique but identical in type), and a list V of elements drawn from the set R, possibly...

mehr als 6 Jahre vor

Gelöst


Set a diagonal
Given a matrix M, row vector v of appropriate length, and diagonal index d (where 0 indicates the main diagonal and off-diagonal...

mehr als 6 Jahre vor

Gelöst


Sum of adjacent elements in a vector
Given a vector v, return a vector s containting the sum of every two adjacent elements in the vector. Every element s(i) cont...

mehr als 6 Jahre vor

Gelöst


multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y. Examples: Input x = 2 Output y is ...

mehr als 6 Jahre vor

Gelöst


The 5th Root
Write a function to find the 5th root of a number. It sounds easy, but the typical functions are not allowed (see the test su...

mehr als 6 Jahre vor

Gelöst


Piecewise linear interpolation
Given an Mx2 vector and a row of M-1 integers, output a two column vector that linearly interpolates Y times between each succes...

mehr als 6 Jahre vor

Gelöst


Project Euler: Problem 3, Largest prime factor
The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number being input, input might be ui...

mehr als 6 Jahre vor

Gelöst


Mersenne Primes vs. All Primes
A Mersenne prime (M) is a prime number of the form M = 2^p - 1, where p is another prime number. <https://www.mathworks.com/matl...

mehr als 6 Jahre vor

Gelöst


Circular Primes (based on Project Euler, problem 35)
The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime. The...

mehr als 6 Jahre vor

Gelöst


Divisible by 6
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

mehr als 6 Jahre vor

Gelöst


Divisible by 3
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

mehr als 6 Jahre vor

Gelöst


Divisible by 4
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

mehr als 6 Jahre vor

Gelöst


Divisible by 5
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

mehr als 6 Jahre vor

Gelöst


Divisible by 2
This is the first problem in a set of "divisible by x" problems. You will be provided a number as a string and the function you ...

mehr als 6 Jahre vor

Gelöst


Number of Even Elements in Fibonacci Sequence
Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...

mehr als 6 Jahre vor

Gelöst


Pi Digit Probability
Assume that the next digit of pi constant is determined by the historical digit distribution. What is the probability of next di...

mehr als 6 Jahre vor

Gelöst


Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

mehr als 6 Jahre vor

Gelöst


Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.

mehr als 6 Jahre vor

Gelöst


Convert radians to degrees
Given input in radians, output to degrees

mehr als 6 Jahre vor

Gelöst


Approximation of Pi
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...

mehr als 6 Jahre vor

Gelöst


Given a square and a circle, please decide whether the square covers more area.
You know the side of a square and the diameter of a circle, please decide whether the square covers more area.

mehr als 6 Jahre vor

Gelöst


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

mehr als 6 Jahre vor

Gelöst


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

mehr als 6 Jahre vor

Mehr laden