MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Matrix Output

  • To: mathgroup at
  • Subject: [mg71022] Re: Matrix Output
  • From: Bill Rowe <readnewsciv at>
  • Date: Sat, 4 Nov 2006 23:07:21 -0500 (EST)

On 11/4/06 at 4:08 AM, xmzwl at (Liz) wrote:

>Hello, how to output the result "E" as matrix? Is there better way
>to get the results and output the results into matrix?

>A=[1 4];
>B=[2 5];
> for m=1:length(A)
>  for n=1:length(B)
>   E=[A(m) B(n)]
>  end
> end

If I understand what you want correctly, then the matrix can be 
created by


{{1, 2}, {2, 3}, {3, 4}, {4, 5}}



{{1, 2}, {2, 3}, {3, 4}, {4, 5}}

Note, it is not a good idea to use uppercase letters as variable 
names in Mathematica as this leads to conflicts with built in 
definitions. Specifically, E is already defined as 2.718... and 
cannot be used to store a matrix
To reply via email subtract one hundred and four

  • Prev by Date: Re: Tricky visualization of maximization problem
  • Next by Date: Re: Tricky visualization of maximization problem
  • Previous by thread: Re: Matrix Output
  • Next by thread: capturing formatting