Feeds
已解决
Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...
2 days 前
已解决
Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...
2 days 前
已解决
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]
2 days 前
已解决
Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to find the logical indices o...
2 days 前
已解决
Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displayed ...
2 days 前
已解决
Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.
4 days 前
已解决
Calculate the average value of the elements in the array
Calculate the average value of the elements in the array
4 days 前
已解决
the average value of the elements
Calculate the average value of the elements in the array
4 days 前
已解决
Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2 3 3 3 4...
5 days 前
已解决
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...
5 days 前
已解决
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...
5 days 前
已解决
Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the numbers. Otherwise return false. Example...
5 days 前
已解决
Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.
5 days 前
已解决
Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given number of...
5 days 前
已解决
Given a square and a circle, please decide whether the square covers more area.
You know the side of a square and the diameter of a circle, please decide whether the square covers more area.
5 days 前
已解决
Pi Estimate 1
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>
5 days 前
已解决
Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...
5 days 前
已解决
Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.] Non-scored bonus...
5 days 前
已解决
Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.
5 days 前


