Spherical radius given four points
Determine the radius of a sphere provided four non-coplanar points on the surface of the sphere.
pts = [x1 y1 z1;
x...
6年以上 前
解決済み
Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...
6年以上 前
解決済み
Clockwise or Counterclockwise
Given a list of 2-d points defining the vertices of a polygon, determine whether these points are sorted clockwise.
The input...
6年以上 前
解決済み
Narcissistic number ?
Inspired by Problem 2056 created by Ted.
In recreational number theory, a narcissistic number is a number that is the sum of ...
6年以上 前
解決済み
Is the Point in a Circle?
Check whether a point or multiple points is/are in a circle centered at point (x0, y0) with radius r.
Points = [x, y];
c...
Find the next prime number
Find the next prime number or numbers for given n. For example:
n = 1;
out = 2;
or
n = [5 7];
out = [7 11];
...
6年以上 前
解決済み
Make a vector of prime numbers
Input(n) - length of vector with prime numbers
Output(v) - vector of prime numbers
Example:
* n=1; v=2
* n=3; v=[2 3 5...
6年以上 前
解決済み
Sophie Germain prime
In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...
6年以上 前
解決済み
Angle between two vectors
You have two vectors , determine the angle between these two vectors
For example:
u = [0 0 1];
v = [1 0 0];
The a...
6年以上 前
解決済み
Test if two numbers have the same digits
Given two integers _x1_ and _x2_, return |true| if the numbers written with no leading zeros contain the same digits. That is, t...