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...
3 months 前
已解决
Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...
3 months 前
已解决
Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...
3 months 前
已解决
Calculate Parallel Resistance
Three resistors connected in parallel have resistances R1, R 2, and R 3, respectively. Return the total resistance R total of ...
3 months 前
已解决
Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...
3 months 前
已解决
Calculate the average value of the elements in the array
Calculate the average value of the elements in the array
3 months 前
已解决
Cricket - How Much More to Beat Bradman?
Sir Don Bradman famously needed only 4 runs in his final innings to retire with an average of 100. Out for a duck, he ended inst...
3 months 前
已解决
Kaprekar Steps
6174 is the Kaprekar constant. All natural numbers less than 10,000 (except some with same digits) can be reduced to 6174 in the...
3 months 前
已解决
Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
For a row vector: V=[7 1 2 -3] there is one sign change (from 2 to -3). So, the function you write must return N=1. F...
3 months 前
已解决
Sum of series VII
What is the sum of the following sequence: Σ(km^k)/(k+m)! for k=1...n for different n and m?
3 months 前
已解决
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...
3 months 前
已解决
Laws of motion 4
Given the initial velocity 'u', final velocity 'v' and acceleration 'a', find the distance travelled.
3 months 前
已解决
Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...
3 months 前
已解决
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...
3 months 前
已解决
Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...
3 months 前
