Skip to main content

All Questions

2 votes
0 answers
34 views

Setting pieces of "matrices" - unwanted behavior

I am constructing matrices whose elements are lists themselves (of varying length), and am (re)setting the entries of these matrices using among others the "All" command. It seems that in ...
Stijn's user avatar
  • 332
3 votes
2 answers
755 views

Creating of the Jordan Canonical Form

I have a matrix polynomial P(s) and the Jordan blocks of P(s) corresponding to every eigenvalue sj (j=1,...,k). How can the Jordan Canonical Form be generated, i.e. the block diagonal matrix which has ...
xelen's user avatar
  • 31
1 vote
4 answers
319 views

Creating a block diagonal matrix when the submatrices in the diagonal are unknown

Let us assume that we have an integer $j$ $(j=1,2,...,k)$ and that for every $j$ is generated a matrix $P$ of dimensions $j$x$j$ . For example, if $j=1$ then $P=(-2)$. If $j=2$ then $$R = \begin{...
arod's user avatar
  • 51
5 votes
6 answers
1k views

Replace element of a matrix with condition

consider a matrix $\left( \begin{array}{ccccc} 0 & 0 & 1 \\ 1 & 0 & 0 \\ 1 & 1 & 0 \\ \end{array}\right)$ How do I do a program that does these steps 1-Replace each ...
user avatar
4 votes
4 answers
475 views

Generating a family of 0-1 matrices satisfying a particular property

I'm looking for an elegant way to generate the set of all possible matrices that satisfy the following properties: Each matrix has 9 rows and c columns, where 1<=c<=9. Each matrix has exactly ...
fishbacp's user avatar
  • 183
0 votes
1 answer
65 views

Can any one help me to create the function of this equation in an easy way.? [closed]

...
M.M Umber's user avatar
0 votes
1 answer
776 views

How does one initialize large arrays in Mathematica with a structured format? [closed]

I want to create a 10 by 10 matrix that increases by 1 every unit across like: 1 2 3 4 5 6 7 8 9 10 11..... Is there a function that does this without having ...
user6276's user avatar
4 votes
4 answers
963 views

Writing a circular matrix

I have two square matrices, $A$ and $B$, of the same size, say, of $m \times m$. What I want is to write a programme/function of three variables, $A$, $B$ and $n$, that outputs the $mn \times mn$ ...
RSG's user avatar
  • 601
4 votes
3 answers
923 views

Creating a matrix under conditions

I would like to create a matrix whose elements satisfy the following conditions ( Mathematica 9 ) ...
asad's user avatar
  • 848
7 votes
5 answers
654 views

Elegant method of generating this matrix?

Good evening, I need to determine an elegant (as possible) method of computing an $n\times n$ matrix below (the matrix shown is just a $16\times16$ example). I've been toying with ...
gKirkland's user avatar
  • 771
2 votes
2 answers
154 views

specified matrix query

can you tell me a way (best?) to get a matrix with i=N,j=N dimensions (quadratic) according to the following rules: variables: N , M, n the diagonal must contain zeros it must contain exactly M ...
pnz1337's user avatar
  • 619
10 votes
4 answers
1k views

An inverted pyramid

I want to draw a pyramid approximately like this ...
eldo's user avatar
  • 81.5k
8 votes
11 answers
1k views

Ragged Diamonds

diamond[n_Integer] := Table[1, {#}] & /@ (Range[n]~ Join~Range[n - 1, 1, -1]) diamond[5] // MatrixForm How could a more functional, "tablefree", solution ...
eldo's user avatar
  • 81.5k
19 votes
11 answers
2k views

Efficient way to build a certain square matrix

For odd n I'm looking for a short and swift way to construct with (f.e.) n = 3 n = 11 <...
eldo's user avatar
  • 81.5k
4 votes
3 answers
442 views

Efficient matrix / array generation

What is the most efficient way of generating the following matrix? $\left( \begin{array}{ccccc} 1 & 0 & 1 & 0 & 1 & 0 & 1 & \dots\\ \frac{1}{2} & \frac{1}{2} & 0 &...
martin's user avatar
  • 8,778

15 30 50 per page