解決済み


Mirror Image matrix across anti-diagonal
Given an input number x, create a mirror image matrix 'Y' across the anti-diagonal. For example, if x=3, Y = [1 2 3; ...

9年弱 前

解決済み


Make a Star Pyramid
Create a star pyramid. First line will have 1 star, second will have two stars and so on... a basic program which is easily done...

9年弱 前

解決済み


Pascal's Matrix
Given an integer n &ge; 0, generate the ( _n_+1) &times; ( _n_+1) lower triangular <http://en.wikipedia.org/wiki/Pascal_matrix P...

9年弱 前

解決済み


Guess Cipher
Guess the formula to transform strings as follows: 'Hello World!' --> 'Ifmmp Xpsme!' 'Can I help you?' --> 'Dbo J ifmq zpv...

9年弱 前

解決済み


Find matching parenthesis
One of the most indispensable things about a great text editor for programming is the ability to quickly jump between matching p...

9年弱 前

解決済み


Without french accent please !
Suppress french accent For example 'Déjà présent' -> 'Deja present'

9年弱 前

解決済み


Ordinal numbers
Given an integer n, return the corresponding ordinal number as a character string. For example, ord(1)='1st' ord(2)=...

9年弱 前

解決済み


Convert a structure into a string
Convert the contents of each fields into a string. Example with an input structure s with 2 fields : s.age = '33' s....

9年弱 前

解決済み


Vector parallel to plane?
Given the coefficients of the equation which defines a plane as follows: ax+by+cz=d, return a boolean indicating whether the 2n...

9年弱 前

解決済み


rectangle in circle
In the figure below, the rectangle at the corner measures a cm x b cm. What is the radius of the circle in cm? <<http://www....

9年弱 前

解決済み


Create a matrix X, where each column is a shifted copy of the vector v
Example : in->v = (1:5)'; 1 2 3 4 5 out-> [1 5 4 3 2;2 1 5 4 3;3 2 1 5 4;4 3 2 1 5;5 4 3 ...

9年弱 前

解決済み


Symmetric matrix
You must create a n-by-n *symmetric* matrix such that A(row,col) = row/col for col >= row. Example if n =3 : output is : ...

9年弱 前

解決済み


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

9年弱 前

解決済み


Maximum of each diagonal
The well-known <http://www.mathworks.com/help/matlab/ref/max.html max> function can operate along either the rows or the columns...

9年弱 前

解決済み


Fill the matrix - 1
Input is a column vector and n. n columns will be added to the left of the input column. The first value of the row is the s...

9年弱 前

解決済み


Remove entire row and column in the matrix containing the input values
Remove the entire row and column from the matrix containing specific values. The specified value can be a scalar or a vector. Fo...

9年弱 前

解決済み


Crunch that matrix!
You are given an M x N matrix. Write a script that will compress this matrix into an M x (N/3) matrix, where each of the terms ...

9年弱 前

解決済み


Sort rows of a matrix
Sort rows of matrix A in an ascending order according to the last column Example input: A = [1 2 3;7 8 9;4 5 6]; Exam...

9年弱 前

解決済み


Divide elements by sum of elements
In this problem, I ask you to write a function which will divide the elements of each column by the sum of the elements of the s...

9年弱 前

解決済み


Replace secondary diagonal elements of a square array
Replace all the secondary diagonal elements of the square array A with the number n Example: A = [1 2 3 4 5 6 ...

9年弱 前

解決済み


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

9年弱 前

解決済み


Another colon problem
This is simple problem based on problems 555, 801, 1118, etc. Create an index vector from two input vectors. Example: ...

9年弱 前

解決済み


Finding peaks
Find the peak values in the signal. The peak value is defined as the local maxima. For example, x= [1 12 3 2 7 0 3 1 19 7]; ...

9年弱 前

解決済み


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

9年弱 前

解決済み


counting groups!
This problem is about counting groups. Example If you have x: x = [0.8 0.8 0.8 0.3 0.3 0.4 0.5 0.6 0.6 0.9] then a...

9年弱 前

解決済み


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

9年弱 前

解決済み


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

9年弱 前

解決済み


Time Expansion
How can you slow down any discrete-time signal? Example Input original signal x. x = [1 2 3 -1 -2 -5 -4] We want t...

9年弱 前

解決済み


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

9年弱 前

解決済み


Sort numbers by outside digits
Sort the array so that they are sorted as if their value was a 5 digit number made from the first three and last two digits of t...

9年弱 前

さらに読み込む