Mercurial > hg > octave-jordi
comparison src/load-save.cc @ 2305:5a3f1d00a474
[project @ 1996-07-09 16:20:40 by jwe]
author | jwe |
---|---|
date | Tue, 09 Jul 1996 16:20:40 +0000 |
parents | 6abec42e52f6 |
children | 31e7eb125d89 |
comparison
equal
deleted
inserted
replaced
2304:532542bd9493 | 2305:5a3f1d00a474 |
---|---|
1143 | 1143 |
1144 ComplexMatrix ctmp (nr, nc); | 1144 ComplexMatrix ctmp (nr, nc); |
1145 | 1145 |
1146 for (int j = 0; j < nc; j++) | 1146 for (int j = 0; j < nc; j++) |
1147 for (int i = 0; i < nr; i++) | 1147 for (int i = 0; i < nr; i++) |
1148 ctmp.elem (i, j) = Complex (re.elem (i, j), im.elem (i, j)); | 1148 ctmp (i, j) = Complex (re (i, j), im (i, j)); |
1149 | 1149 |
1150 tc = ctmp; | 1150 tc = ctmp; |
1151 } | 1151 } |
1152 else | 1152 else |
1153 tc = re; | 1153 tc = re; |
1821 int k = 0; | 1821 int k = 0; |
1822 for (int i = 0; i < nr; i++) | 1822 for (int i = 0; i < nr; i++) |
1823 { | 1823 { |
1824 for (int j = 0; j < nc; j++) | 1824 for (int j = 0; j < nc; j++) |
1825 { | 1825 { |
1826 double d = m.elem (i, j); | 1826 double d = m (i, j); |
1827 if (xisnan (d)) | 1827 if (xisnan (d)) |
1828 goto next_row; | 1828 goto next_row; |
1829 else | 1829 else |
1830 retval.elem (k, j) = xisinf (d) ? (d > 0 ? OCT_RBV : -OCT_RBV) : d; | 1830 retval (k, j) = xisinf (d) ? (d > 0 ? OCT_RBV : -OCT_RBV) : d; |
1831 } | 1831 } |
1832 k++; | 1832 k++; |
1833 | 1833 |
1834 next_row: | 1834 next_row: |
1835 continue; | 1835 continue; |
1852 int k = 0; | 1852 int k = 0; |
1853 for (int i = 0; i < nr; i++) | 1853 for (int i = 0; i < nr; i++) |
1854 { | 1854 { |
1855 for (int j = 0; j < nc; j++) | 1855 for (int j = 0; j < nc; j++) |
1856 { | 1856 { |
1857 Complex c = m.elem (i, j); | 1857 Complex c = m (i, j); |
1858 if (xisnan (c)) | 1858 if (xisnan (c)) |
1859 goto next_row; | 1859 goto next_row; |
1860 else | 1860 else |
1861 { | 1861 { |
1862 double re = real (c); | 1862 double re = real (c); |
1863 double im = imag (c); | 1863 double im = imag (c); |
1864 | 1864 |
1865 re = xisinf (re) ? (re > 0 ? OCT_RBV : -OCT_RBV) : re; | 1865 re = xisinf (re) ? (re > 0 ? OCT_RBV : -OCT_RBV) : re; |
1866 im = xisinf (im) ? (im > 0 ? OCT_RBV : -OCT_RBV) : im; | 1866 im = xisinf (im) ? (im > 0 ? OCT_RBV : -OCT_RBV) : im; |
1867 | 1867 |
1868 retval.elem (k, j) = Complex (re, im); | 1868 retval (k, j) = Complex (re, im); |
1869 } | 1869 } |
1870 } | 1870 } |
1871 k++; | 1871 k++; |
1872 | 1872 |
1873 next_row: | 1873 next_row: |