Group-wise Euclidean distance
*Input*:
* *x* —— An array of size *n-by-d*, where each row vector denotes a point in a d-dimensional space;
* *g* —— A gro...
6年以上 前
解決済み
Hexagonal numbers on a spiral matrix
Put hexagonal numbers in a ( m x m ) spiral matrix and return the sum of its diagonal elements.
Formula of hexagonal numbers ...
6年以上 前
解決済み
Circumscribed Pentagon?
Building off of <https://www.mathworks.com/matlabcentral/cody/problems/44368 Problem 44368>, your function will be provided with...
6年以上 前
解決済み
Pair Primes
Let's define pair primes as follow;
* *For 2 digits numbers:* 11 and 17 are pair primes because both of them are 2 digits pri...
An asteroid and a spacecraft
Imagine a non-relativistic simple situation.
Assume positions p0, p1, p2, and p3 are three dimensional Cartesian coordinates...
6年以上 前
解決済み
Sums of Distinct Powers
You will be given three numbers: base, nstart, and nend. Write a MATLAB script that will compute the sum of a sequence of both ...