Reverse the vector
Reverse the vector elements.
Example:
Input x = [1,2,3,4,5,6,7,8,9]
Output y = [9,8,7,6,5,4,3,2,1]
1年以上 前
解決済み
Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes.
---
If you want to get a random permutation of integer...
1年以上 前
解決済み
Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle.
<<https://i.imgu...
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so:
x = [1 2 3 4]
Commas are optional, s...
ICFP2021 Hole-In-Wall: Calculate Score
The ICFP held its annual 3-day contest in July 2021 with Hole-In-Wall. Contest Specification.
The contest folds the figure in R...
1年以上 前
解決済み
MATLAB Counter
Write a function f = counter(x0,b) to construct a counter handle f that counts with an initial value x0 and a step size b.
E...
1年以上 前
解決済み
Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN;
output -> matrix(p*m), the same matrix where we deleted the enti...
1年以上 前
解決済み
Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.
1年以上 前
解決済み
Basic Mathematics 4
Team #1 is in first place but only one point higher than Team #2. The sum of their two scores is N. What are each team’s scores...
1年以上 前
解決済み
Coefficient of Kinetic friction
A robot exerts a F1 lb. force horizontally on a W lb. crate across a concrete floor at a constant speed. What is the coefficien...
1年以上 前
解決済み
Convert RGB to Grayscale
Convert a 3 element RGB array to its correspoding grayscale pixel (a scalar)
*Hint: a formula exists!
1年以上 前
解決済み
ICFP2024 006: Lambda 21 - 3D
The ICFP2024 contest was held June29 thru July 1. The contest consisted of five parts: ICFP Language, Lambdaman maze, Starship f...