已解决


the average value of the elements
Calculate the average value of the elements in the array

2 years 前

已解决


Double all elements in the array
Duplicate all elements in the array

2 years 前

已解决


calculate the length of matrix
input 1 array, calculate the length

2 years 前

已解决


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

2 years 前

已解决


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

2 years 前

已解决


Sum of diagonals elements of a matrix
Given a matrix, return the sum of all the elements across the diagonals. E.g. A = [1 2 3; 4 5 6; 7 8 9;...

2 years 前

已解决


Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

2 years 前

已解决


Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

2 years 前

已解决


Change the sign of even index entries of the reversed vector
change the signs of the even index entries of the reversed vector example 1 vec = [4 -1 -2 9] ans = [9 2 -1 -4] example2...

2 years 前

已解决


Find last zero for each column
Given a numeric array of arbitrary size, return the row index of the last zero for each column. If a column contains all nonzero...

2 years 前

已解决


Count consecutive 0's in between values of 1
So you have some vector that contains 1's and 0's, and the goal is to return a vector that gives the number of 0's between each ...

2 years 前

已解决


Determine the number of odd integers in a vector
Determine the number of unique odd integers in a vector. Examples: Input x = [2 5 8 3 7 1]; Output y = 4; Inp...

2 years 前

已解决


What is Sum Of all elements of Matrix
Given the matrix x, return the sum of all elements of matrix. Example: Input x = [ 1 2 0 0 0 0 6 9 3 3 ] ...

2 years 前

已解决


Complex transpose
Calculate the transpose of a matrix having complex numbers as its elements without changing the signs of the imaginary part. ...

2 years 前

已解决


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

2 years 前

已解决


Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

2 years 前

已解决


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

2 years 前

已解决


What number has this problem?
This problem is added because it is problem number *???* in the "Community" problems section. <http://www.mathworks.de/matlab...

2 years 前

已解决


Given area find sides
In a right angle triangle given area 'A' one arm=x, another arm=2x then find the value of x. For example, area A=400 then ...

2 years 前

已解决


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...

2 years 前

已解决


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

2 years 前

已解决


Return area of square
Side of square=input=a Area=output=b

2 years 前

已解决


Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

2 years 前

已解决


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...

2 years 前

已解决


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...

2 years 前

已解决


frame of the matrix
Given the matrix M, return M without the external frame.

2 years 前

已解决


subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

2 years 前

已解决


Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

2 years 前

已解决


Given a matrix, swap the 2nd & 3rd columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

2 years 前

已解决


Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...

2 years 前

加载更多