home *** CD-ROM | disk | FTP | other *** search
/ Borland Programmer's Resource / Borland_Programmers_Resource_CD_1995.iso / utils / mathstud / hilb.m < prev    next >
Encoding:
Text File  |  1995-05-19  |  249 b   |  10 lines

  1. function [x]=hilb(n)
  2. %hilb create Hilbert matrix (a badly conditioned matrix)
  3.  
  4. %       S.Halevy 7/31/92
  5. %       Copyright (c) 1992 by the MathWizards
  6.  
  7. x=1:n;               % index row
  8. x=x(ones(n,1),:);    % smear rows
  9. x=1 ./ (x + x.' - 1);
  10.