Linear Motion 5
A robot moving down an incline for 3 seconds undergoes a uniform acceleration of a ft/s2. If the robot has an initial velocity o...
3年弱 前
解決済み
Linear Motion 4
A robot accelerates at a rate of A ft/s2. Assuming the robot starts from rest how much time is required to reach an object loca...
3年弱 前
解決済み
Next Tribonacci Number
The "Tribonacci" sequence is an extension of the idea of the Fibonacci sequence:
That is, each new term is the sum of the thr...
Matrix to column conversion
Given a matrix of any size, convert it into a column vector.
e.g A=[10 20 30;
40 50 60]
then,
B = [10;
40;
...
3年弱 前
解決済み
Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns.
E...
Divisible by 5
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...
3年弱 前
解決済み
Divisible by 2
This is the first problem in a set of "divisible by x" problems. You will be provided a number as a string and the function you ...
3年弱 前
解決済み
Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody.
Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...
Swap two numbers
Example
Input:
a = 10
b = 20
Output
a = 20
b = 10
3年弱 前
解決済み
Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.
What is the Nth prime numb...