已解决


Geometric Series
Given x and n, give the sum of x ^ 1 to x ^ n. You should not have to use a loop for this.

7 years 前

已解决


Average of odd values
Find the average of odd values in given a matrix. e.g x=[ 4 11 8 ; 9 2 7 ] y =( 11 + 9+ 7 ) / 3

7 years 前

已解决


Calculate roots of polynomial given as vector array.
Calculate roots of polynomial given as vector array. Example x=[1 2 0 5 0 3] result=[-2.7267 ; ...

7 years 前

已解决


Add the odd numbers
Add only the odd numbers of x example: x = [1 2 3 4 5] the positive numbers are: 1 3 5, so their sum is 9

7 years 前

已解决


Find out characteristics equation of given matrix.
Find out characteristics equation of given matrix. A=[0 2; 1 8] then char. eq is s^2-8*s-2=0 and answer should be [1 -8 -2] ...

7 years 前

已解决


Design matrix from eigenvalues
Write a function that takes one input argument n and outputs a (n x n) square matrix A with the following properties: -A has...

7 years 前

已解决


Solve the following boundary value problem
Return the sum of sum(res.y) y"+|y|=0 y(0)=a y(4)=b Tip: use bvp4c

7 years 前

已解决


How many monitors are connected ?
How to obtain the numbers of monitors connected to your computer ?

7 years 前

已解决


Saving MATLAB session to a file
How to save MATLAB session to a file?

7 years 前

已解决


Skip by a multiple
Given an integer create an array of its multiples. Array must have a length of 15

7 years 前

已解决


Find Index of maximum Value and maximum Value of a vector
Find the Index of the first occurrence of the maximum value in a vector and also the maximum value in the vector. Example: [...

7 years 前

已解决


intersection of matrices
Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identi...

7 years 前

已解决


Pentagonal Numbers
Your function will receive a lower and upper bound. It should return all pentagonal numbers within that inclusive range in ascen...

7 years 前

已解决


Replicate elements in vectors
Replicate each element of a row vector (with NaN) a constant number of times. Examples n=2, A=[1 2 3] -> [1 1 2 2 3 3] ...

7 years 前

已解决


How to subtract?
*&plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn* * Imagine you need to subtract one...

7 years 前

已解决


Generate a string like abbcccddddeeeee
This is the string version of Problem 1035. <http://www.mathworks.com/matlabcentral/cody/problems/1035-generate-a-vector-like-1-...

7 years 前

已解决


Evil Number
Check if a given natural number is evil or not. Read more at <https://oeis.org/A001969 OEIS>.

7 years 前

已解决


Remove the first, third and fifth rows of a matrix
Given a matrix x with at least five rows, return a matrix y that includes all rows of x except for th 1st, the 3rd and 5th. E...

7 years 前

已解决


Mode
Find the mode of the vector Assumption: no vector is bimodal Example 1: input=[1 2 3 4 4]; output=4 Example 2: input=[7...

7 years 前

已解决


Matrix with different incremental runs
Given a vector of positive integers a = [ 3 2 4 ]; create the matrix where the *i* th column contains the vector *1:a(i)...

7 years 前

已解决


Reshape a Vector
Write a function that accept three inputs. The first one is a row vector S. The second and third arguments are m and n which de...

7 years 前

已解决


Create Vector containing following elements
Create Vector containing following elements A=[pi eps NaN inf -inf flintmax];

7 years 前

已解决


Basic commands - amount of inputs
Make a function, which will return amount of given inputs Example: amountinput(1,2,4,3,10) -> 5 , because we gave functio...

7 years 前

已解决


Tiling a matrix
Given a matrix and a number of columns, replicate matrix in a single row

7 years 前

已解决


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

7 years 前

已解决


Are you in XY plane?
Take a point P as an input position Vector (x,y,z). If you are in XY plane, return 1 as an output otherwise return 0. Example...

7 years 前

已解决


Find the index of n in magic(n)
If input n=5, then magic(n) is 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22...

7 years 前

已解决


Special matrix
Make a square matrix with this shape. For n=4 M = 1 1 0 0 1 0 1 0 0 1 0 ...

7 years 前

已解决


Sum of first n terms of a harmonic progression
Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....

7 years 前

已解决


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

7 years 前

加载更多