Newsgroups: comp.lang.apl
Path: watmath!watserv2.uwaterloo.ca!mach1!torn!csd.unb.ca!UNBVM1.CSD.UNB.CA
From: Allison Schriver <SCHR@UNB.CA>
Subject: Question: Tri-diagonal matrices in APL
Message-ID: <27APR93.10680596.0076@UNBVM1.CSD.UNB.CA>
Lines: 14
Sender: usenet@UNB.CA
Organization: The University of New Brunswick
Date: Tue, 27 Apr 1993 13:53:21 GMT


What is the most efficient way to generate a tri-diagonal matrix,
as below, in APL? I am using STSC APL*PLUS, v10.0.

 2 -1  0  0  0  0
-1  2 -1  0  0  0
 0 -1  2 -1  0  0
 0  0 -1  2 -1  0
 0  0  0 -1  2 -1
 0  0  0  0 -1  2

Thank you for your assistance

Allison Schriver (SCHRIVER@UNB.CA)
