解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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]

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


Matrix for beginners
Multiply x and y elemwise.

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

解決済み


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.

5年以上 前

解決済み


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

5年以上 前

解決済み


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

5年以上 前

さらに読み込む