倍频缓冲控制台输出

问题描述 投票:0回答:1

我是Octave的新手。

我正在处理一个巨大的矩阵,它有几千行,只有两列。

当我打印的时候,终端似乎在剪切一部分,但我想显示整个矩阵。

有什么方法可以做到这一点,或者可以将输出结果重定向到一个文件或其他什么地方?

我在Eclipse中也遇到过同样的问题,但当时解决同样的问题要容易得多。

octave
1个回答
0
投票

将矩阵重定向到一个文件,使用保存

A=rand(5,5)
A =

   0.552789   0.570720   0.896715   0.982821   0.622758
   0.704791   0.514302   0.380680   0.344768   0.459588
   0.230478   0.744468   0.668264   0.659316   0.414710
   0.819015   0.572315   0.404128   0.074092   0.813156
   0.099461   0.031186   0.499781   0.758091   0.243281

 save("-ascii","file-ascii.txt","A")
 save("file-text.txt","A")

纯文本

$ cat  file-ascii.txt
 5.52789005e-01 5.70719716e-01 8.96714571e-01 9.82821412e-01 6.22757836e-01
 7.04791031e-01 5.14301972e-01 3.80679512e-01 3.44768074e-01 4.59587827e-01
 2.30478499e-01 7.44467506e-01 6.68264066e-01 6.59315817e-01 4.14709954e-01
 8.19014881e-01 5.72314594e-01 4.04128230e-01 7.40916214e-02 8.13155903e-01
 9.94607828e-02 3.11857103e-02 4.99780576e-01 7.58091470e-01 2.43280663e-01

八度音默认风格

 $ cat  file-text.txt
# Created by Octave 5.2.0, Wed May 27 21:43:22 2020 CEST <Marco@LAPTOP-82F08ILC>
# name: A
# type: matrix
# rows: 5
# columns: 5
 0.55278900467056769 0.57071971558810353 0.89671457115004172 0.98282141203898321 0.622757835845834
 0.70479103140202992 0.51430197227101204 0.3806795123567624 0.34476807355856237 0.45958782700965189
 0.2304784985452572 0.74446750644064241 0.66826406647042169 0.65931581744685042 0.41470995365627888
 0.81901488130574696 0.57231459443213173 0.40412823039438278 0.074091621362711677 0.81315590327055964
 0.099460782832668723 0.031185710267227097 0.49978057628118927 0.75809147040922908 0.24328066285306477
© www.soinside.com 2019 - 2024. All rights reserved.