Risolto

arithmetic progression

I've written a program to generate the first few terms of <https://en.wikipedia.org/wiki/Arithmetic_progression arithmetic progr...

10 mesi fa

Risolto

Find similar sequences

Another problem inspired by a question on the <http://www.mathworks.com/matlabcentral/answers answers> forum. Given a matrix ...

10 mesi fa

Risolto

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...

10 mesi fa

Risolto

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...

10 mesi fa

Risolto

Generate Square Wave

Generate a square wave of desired length, number of complete cycles and duty cycle. Here, duty cycle is defined as the fraction ...

10 mesi fa

Risolto

Sum of series VII

What is the sum of the following sequence: Σ(km^k)/(k+m)! for k=1...n for different n and m?

10 mesi fa

Risolto

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 number of...

10 mesi fa

Risolto

Sum of series VI

What is the sum of the following sequence: Σk⋅k! for k=1...n for different n?

10 mesi fa

Risolto

Sum of series V

What is the sum of the following sequence: Σk(k+1) for k=1...n for different n?

10 mesi fa

Risolto

Create an arrow matrix

An arrow matrix is a square matrix that contains ones on the diagonal, the last column, and last row. ...

10 mesi fa

Risolto

Generate this matrix

Generate the following matrix. n = 2; out = [-4 -3 -2 -1 0 -3 -2 -1 0 1 -...

10 mesi fa

Risolto

Simpson's Paradox - Calculate correlation coefficients for groups of data

Simpson's Paradox is a statistical phenomenon where groups of data can have a characteristic while the whole data set together h...

10 mesi fa

Risolto

Find the minimum of the column-maximums of a matrix

Given a matrix A, find the maximum value of each column, then return the smallest of those maximum values (ie return the minimum...

10 mesi fa

Risolto

Calculate the mean of each half of a matrix

Given a matrix with an even number of columns, n, return a 1-by-2 row vector where the first element is the mean of all the elem...

10 mesi fa

Risolto

Find Closest Constant

Given a number x, return the value that is closest to x from this list of constants: 0, 1, , e, , (also known as ). For exampl...

10 mesi fa

Risolto

Matrix Quadrants

Write a function that takes N as the input, and outputs a matrix whose upper-left (NxN) quadrant contains all ones, the lower-ri...

10 mesi fa

Risolto

Convert Roman to Arabic Numerals

Based upon what I see on tv and at the movies, the use of Roman numerals indicates something is important or sophisticated (e.g....

10 mesi fa

Risolto

Without the French accent please!

Suppress the French accent. Example 'Déjà présent' -> 'Deja present'

10 mesi fa

Risolto

Decimal Comparison

*Background* A utility of particular interest to Cody and other MATLAB ventures is comparing the equality of two numbers. In ...

10 mesi fa

Risolto

Add more zeros

Find code that adds one 0 to each sequence of 0 in a string (composed with only 0 or 1). For example: '1010' -> '100100' ...

10 mesi fa

Risolto

Sum of series IV

What is the sum of the following sequence: Σ(-1)^(k+1) (2k-1)^2 for k=1...n for different n?

10 mesi fa

Risolto

Sum of series III

What is the sum of the following sequence: Σ(2k-1)^3 for k=1...n for different n?

10 mesi fa

Risolto

Sum of series II

What is the sum of the following sequence: Σ(2k-1)^2 for k=1...n for different n?

10 mesi fa

Risolto

Sum of series I

What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

10 mesi fa

Risolto

Number of 1s in the Binary Representation of a Number

*Description* Return the number of 1s in the (unsigned integer) binary representation of a number. This function should be ab...

10 mesi fa

Risolto

Matrix spiral

Make a spiral in a (n*n) matrix. The spiral has to start in the top left, and has to rotate clockwise to the center. The spiral ...

10 mesi fa

Risolto

Spiral In

Create an m by n matrix filled with sequential integers starting from 1 and arranged in a counterclockwise spiral that hugs the ...

10 mesi fa

Risolto

Create a patchwork matrix

This function will assemble a large matrix out of a number of smaller ones m1, m2, etc., according to a pattern P. If P is 3x5,...

10 mesi fa

Risolto

Create a matrix X, where each column is a shifted copy of the vector v

Example : in->v = (1:5)'; 1 2 3 4 5 out-> [1 5 4 3 2;2 1 5 4 3;3 2 1 5 4;4 3 2 1 5;5 4 3 ...

10 mesi fa

Risolto

Symmetric matrix

You must create a n-by-n *symmetric* matrix such that A(row,col) = row/col for col >= row. Example if n =3 : output is : ...

10 mesi fa