Risolto


Mid-term report
You just got your mid-term report, but it's full of ones and twos :(. So before you give it to your parents, you change it, in o...

quasi 6 anni fa

Risolto


Simple Matrix
Make the following matrix without typing it in one by one. [1 2 3; 2 4 6; 4 8 12] x=[1 2 3].

quasi 6 anni fa

Risolto


Problem for beginners
Suppose that x is a column vector, with at least a length of 6. Delete the 2., 6., and the second last row. Example: X=[1;2;3...

quasi 6 anni fa

Risolto


Problem for beginners
M is a nxm matrix. Swap the fist and the second last column with eachother. X=[1 2 3;4 5 6;7 8 9] Y=[2 1 3;5 4 6;8 7 9]

quasi 6 anni fa

Risolto


Stairs
Make an n by n matrix, where the elements are ones and zeros. In the main diagonal, and under that, there should be only ones (...

quasi 6 anni fa

Risolto


Square
X is a number, write a code, where Y should be the square of X.

quasi 6 anni fa

Risolto


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

quasi 6 anni fa

Risolto


Matrix problem for beginners
Make a matrix [0,0,0;1,1,1;2,2,2]. X=[0,1,2]

quasi 6 anni fa

Risolto


Matrix for beginners
Multiply x and y elemwise.

quasi 6 anni fa

Risolto


Please check the last row
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,...

quasi 6 anni fa

Risolto


Calculate the sum of two polynomials
Calculate the sum of two polynomials if they are written in notation with their coefficients. example: a=[3 4 5]; b=[...

quasi 6 anni fa

Risolto


Make an N-dimensional Multiplication Table
*INSTRUCTIONS* This is a multi-dimensional variant of the normal multiplication table used to teach elementary students multi...

quasi 6 anni fa

Risolto


~~~~~~~ WAVE ~~~~~~~~~
|The WAVE generator| Once upon a time there was a river. 'Sum' was passing by the river. He saw the water of the river that w...

quasi 6 anni fa

Risolto


Given a 4x4 matrix, swap the two middle columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

quasi 6 anni fa

Risolto


Some Assembly Required
The input to this function is a matrix of real numbers. Your job is to assemble the rows of the matrix into one large row that ...

quasi 6 anni fa

Risolto


Approximate e
Given a and n, compute and approximation to f = a * e ^ n, without the use of exp, string operations, or floating point numbers....

quasi 6 anni fa

Risolto


Bouncy numbers
Inspired by Project Euler n°112. * * Working from left-to-right if no digit is exceeded by the digit to its left it is call...

quasi 6 anni fa

Risolto


Euler–Mascheroni constant
Approximate the Euler-Mascheroni constant using the series representation gamma_n=\sum_{k=1}^{n} [1/k-ln(1+1/k)] Calculat...

quasi 6 anni fa

Risolto


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

quasi 6 anni fa

Risolto


Find Pseudo-Cyclic Number
A cyclic number is an integer in which cyclic permutations of the digits are successive multiples of the number https://en.wikip...

quasi 6 anni fa

Risolto


Nth roots of unity
First, find the n nth roots of unity. eg if n = 6, find the n distinct (complex) numbers such that n^6 = 1. <https://en.wiki...

quasi 6 anni fa

Risolto


Pseudo Square Root (Inspired by Project Euler 266)
Shamelessly copied from the Project Euler page for Problem 266: ------------- The divisors of 12 are: 1,2,3,4,6 and 12. T...

quasi 6 anni fa

Risolto


Hilbert numbers
Given a positive integer, n, return h as follows: 1. If n is not a <https://en.wikipedia.org/wiki/Hilbert_number Hilbert numb...

quasi 6 anni fa

Risolto


Lah Numbers
Create a square lower diagonal matrix containing the first n Lah number coefficients. In mathematics, the Lah numbers are coeffi...

quasi 6 anni fa

Risolto


Give me Hamming on five, hold the mayo
A Hamming Number is a positive number that has no prime factor greater than 5. Given a number X, determine how many Hamming num...

quasi 6 anni fa

Risolto


Amicable numbers
Test whether two numbers are <https://en.wikipedia.org/wiki/Amicable_numbers amicable>, meaning that the sum of the proper divis...

quasi 6 anni fa

Risolto


I'm going to enjoy watching you calculate, Mr Anderson
Smith numbers are numbers such that if you add up all of the digits in the number, that sum equals the sum of all of the digits ...

quasi 6 anni fa

Risolto


Find two triangular numbers whose sum is input.
Find two triangular numbers whose sum is _input_. Note: The difference beetween the triangular numbers should be minimum.

quasi 6 anni fa

Risolto


How brilliant are you?
A Brilliant number is defined as a number with two prime factors, both of which have the same number of digits. Some examples: ...

quasi 6 anni fa

Risolto


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

quasi 6 anni fa

Carica altro