Recaman Sequence - II
Take an arbitrary starting point as input and create Recaman Sequence. Then find the 1, return its index.
For example: if n =...
4 years 前
已解决
Recaman Sequence - I
Recaman Sequence (A005132 - <http://oeis.org/A005132 - OEIS Link>) is defined as follow;
seq(0) = 0;
for n > 0, seq(n) ...
4 years 前
已解决
Sums of Multiple Pairs of Triangular Numbers
This is a follow-up to <https://www.mathworks.com/matlabcentral/cody/problems/44289 Problem 44289> - Find two triangular numbers...
4 years 前
已解决
Van Eck's Sequence's nth member
Return the Van Eck's Sequence's nth member.
For detailed info : <http://oeis.org/A181391 OEIS link> and <https://www.theguard...
4 years 前
已解决
Write c^3 as sum of two squares a^2+b^2
write c^3 as sum of two squares a^2+b^2. a and b must be integer and greater than zero.
For example
5^3 = 2^2 + 11^2
5...
Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have
a = [1 2 2 2 1 ...
4 years 前
已解决
Rescale Scores
Each column (except last) of matrix |X| contains students' scores in a course assignment or a test. The last column has a weight...
4 years 前
已解决
Calculate Inner Product
Given two input matrices, |x| and |y|, check if their inner dimensions match.
* If they match, create an output variable |z|...
4 years 前
已解决
Find MPG of Lightest Cars
The file |cars.mat| contains a table named |cars| with variables |Model|, |MPG|, |Horsepower|, |Weight|, and |Acceleration| for ...
4 years 前
已解决
A Simple Tide Gauge with MATLAB
*∿ ∿ ∿ ∿ ∿ ∿ ∿ ∿*
You are standing in a few inches of sea water on a beach.
You a...
4 years 前
已解决
Find the Best Hotels
Given three input variables:
* |hotels| - a list of hotel names
* |ratings| - their ratings in a city
* |cutoff| - the rat...
4 years 前
已解决
Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...
4 years 前
已解决
Calculate BMI
Given a matrix |hw| (height and weight) with two columns, calculate BMI using these formulas:
* 1 kilogram = 2.2 pounds
* 1 ...