Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'unexpected output from matrix creation' topicStudent Support Forum > General > "unexpected output from matrix creation"

Next Comment >Help | Reply To Topic
Author Comment/Response
Nathan C. Lee
10/31/02 08:54am

I'm getting a curious result from the creation of a matrix using a function containing several If operators.

Please see the notebook file attached or at my URL for a better view.

What I'm trying to do is generate an nxn square matrix within some specific parameters (defined by my if statements). Here is my function:
And it outputs a matrix with the last column containing the _functions_ meant to be evaluated, and not their actual result. When I replace the 'n' terms in the function above, I get the expected result.

Any ideas why I can't get the result when I use a variable?

I'm also wondering why I can't use the variable n to define my range, as in
This isn't as pressing an issue, but it would be nice if I could do this.

Attachment: mathematicaissue.nb, URL:,

Subject (listing for 'unexpected output from matrix creation')
Author Date Posted
unexpected output from matrix creation Nathan C. Lee 10/31/02 08:54am
Re: unexpected output from matrix creation Forum Modera... 11/02/02 4:04pm
Next Comment >Help | Reply To Topic