解決済み


Replace every 3rd element in a vector with 4
x is a vector of undetermined length You are to replace every 3rd element with the number 4, example: x = [11 23 34 43 2 3...

2年弱 前

解決済み


Integer Sequence - 1
Check the test suite to determine the relationship between input integer scalar and output integer scalar.

2年弱 前

解決済み


Slicing the cube
A bored matlab enthusiast has a cube with volume n^3. He decides to paint the entire surface of the cube red. Then, with slices...

2年弱 前

解決済み


Find out sum of prime number till given number
Find out sum of prime number till given number Example, if number is 10, then answer must be 17.

2年弱 前

解決済み


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

2年弱 前

解決済み


Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] is s...

2年弱 前

解決済み


Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation, * F(n) = F(n-1) + F(n-2) * where F(1) = 1 and F(1)...

2年弱 前

解決済み


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

2年弱 前

解決済み


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

2年弱 前

解決済み


We love vectorized solutions. Problem 1 : remove the row average.
Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

2年弱 前

解決済み


Orthonormal matrix
You decide whether any given matrix is an orthonormal matrix or not. If each column in a matrix is perpendicular to the other...

2年弱 前

解決済み


Is this matrix orthogonal?
Given a square matrix, a, determine whether it is orthogonal. INPUT: a, a n x n matrix OUTPUT: true or false

2年弱 前

解決済み


Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the second...

2年弱 前

解決済み


Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...

2年弱 前

解決済み


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

2年弱 前

解決済み


Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...

2年弱 前

解決済み


Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

2年弱 前

解決済み


Diagonal Pattern
For a positive integer |n|, return an |nXn| matrix |mat| such that the value of each element in row |i| and column |j| is given ...

2年弱 前

解決済み


Create sequnce 1 4 9 16 25.........
Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input

2年弱 前

解決済み


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Input...

2年弱 前

解決済み


Draw a '0' in a one matrix!

2年弱 前

解決済み


Remove a specific row with max value
Remove the row that contain the max value in the matrix? If you like the problem, please like it :)

2年弱 前

解決済み


Return fibonacci sequence do not use loop and condition
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: ...

2年弱 前

解決済み


Sum of series
a(n) = n^2 - (n-1)^2 find the summation of the series upto n i.e. a(1)+a(2)+...+a(n)

2年弱 前

解決済み


Sum of series IX
What is the sum of the following sequence: Σ 1/k! for k=1...n for different n?

2年弱 前

解決済み


Sum of series VIII

2年弱 前

解決済み


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?

2年弱 前

解決済み


Sum of series VI
What is the sum of the following sequence: Σk⋅k! for k=1...n for different n?

2年弱 前

解決済み


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

2年弱 前

解決済み


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

2年弱 前

さらに読み込む