Solved


Compute the Bernoulli numbers
The <https://en.wikipedia.org/wiki/Bernoulli_number Bernoulli numbers> appear in several applications in number theory, includin...

6 years ago

Solved


Extract leading non-zero digit (★★★★★)
(Copy of Problem 47) Benford's Law states that the distribution of leading digits is not random. This is probably because man...

6 years ago

Solved


How many points lie within the rectangle and how many aren't?
Suppose, you are given the coordinates of bottom-left and top-right corners of a rectangle as *input-1, R* i.e *R=[Bottom-left c...

6 years ago

Solved


Bto
Hangisi daha büyük

6 years ago

Solved


DETERMİNE bigger input
which one is biigger x or z

6 years ago

Solved


Calculate the volume of a cone
Calculate the volume of a cone given an array containing one column of radii and one column of the height of the cone. * Reme...

6 years ago

Solved


Triangle Numbers (★★)
(copy of problem 5) Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3...

6 years ago

Solved


Make a checkerboard matrix (★★★★★)
(copy of Prob. 4) Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1...

6 years ago

Solved


sumdigits
function [p1,p2] = goldbach(n) for p1 = 1:n if isprime(p1) p2 = n - p1; if isprime(p2) re...

6 years ago

Solved


Sort even numbers from 1 to 100
Sort even numbers from 1 to 100 for ex: x=1:100

6 years ago

Solved


Times 7
Try out this test problem first. Given the variable x as your input, multiply it by seven and put the result in y. Example...

6 years ago

Solved


Times 6
Try out this test problem first. Given the variable x as your input, multiply it by six and put the result in y. Examples:...

6 years ago

Solved


Which one is More bigger?
we have two input like (x,y) our output (z) must wich one is bigger input.

6 years ago

Solved


Replicate elements in vectors (★★★)
(copy of Prob 867) Replicate each element of a row vector (with NaN) a constant number of times. Examples n=2, A=[1 2...

6 years ago

Solved


Remove the row average (★★★)
(copy of Prob. 963) Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solut...

6 years ago

Solved


Average of corner elements of a matrix (★★)
(copy of prob 2235) Calculate the average of corner elements of a matrix. e.g. x=[1 2 3; 4 5 6; 7 8 9;] avg = (1+3+7+9)...

6 years ago

Solved


Generate a vector which contains a pyramid pattern (★★★★)
Generate a vector that contains terms that follows a pyramid pattern up to the nth row: 1 2 2 3 3 3 4 4 4 4 ...

6 years ago

Solved


Doubling elements in a vector (★★)
(copy of prob. 1024) Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] t...

6 years ago

Solved


Create times-tables (★★★)
(copy of prob 33) At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 ti...

6 years ago

Solved


Column Removal (★★★)
(copy of prob 7) Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2...

6 years ago

Solved


Swap the first and last columns (★★)
(copy of Prob 19) Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becom...

6 years ago

Solved


Select every other element of a vector (★★)
(copy of prob 6) Write a function which returns every other element of the vector passed in. That is, it returns the all odd-...

6 years ago

Solved


Bit to Gigabyte
1 bit = 1.25 × 10^-10 gigabytes | x is bit | y is gigabyte

6 years ago

Solved


Sum of elements in a vector (★)
(copy of Prob. 3) Find the sum of all the numbers of the input vector x. Input x = [1 2 3 5] Output y is 11 <> ...

6 years ago

Solved


Sum of elements of a vector (★★★)
Given any vector x = [x1, x2, x3, ... xn], compute the sum of its elements. Thus, if x = [ 1 3 -2 5 ], then the sum of its el...

6 years ago

Solved


Magnitude of a vector (★★★)
Given a vector x with values [ x1, x2, x3, ..., xn ], compute the magnitude (or length) of the vector which is given by <<htt...

6 years ago

Solved


Volume of Equilateral Triangle Prism
Find volume of equilateral triangle prism x = side of triangle l = length of prism

6 years ago

Solved


Volume of Cylinder
Find the volume of a cylinder

6 years ago

Solved


Watt
Ampere x Volt = Watt

6 years ago

Solved


Mile to Kilometer
x is mile and y is km

6 years ago

Load more