Octave 使用';时在八度音程的tablicious软件包中出现访问错误;水下隧道';和';水下道路';方法

Octave 使用';时在八度音程的tablicious软件包中出现访问错误;水下隧道';和';水下道路';方法,octave,Octave,我正在使用“Tablicious”包创建八度表。表创建得很好,但当我尝试使用“subsetrows”或“subsetvars”筛选行或列时,我遇到了一个访问错误 pkg load tablicious # Data Table = {'Length', 'Force', 'Max_force'}; Length = [100; 125; 160; 200; 250; 315; 400; 500; 630; 720; 800; 1000]; Force = [250; 300; 300; 350

我正在使用“Tablicious”包创建八度表。表创建得很好,但当我尝试使用“subsetrows”或“subsetvars”筛选行或列时,我遇到了一个访问错误

pkg load tablicious

# Data
Table = {'Length', 'Force', 'Max_force'};
Length = [100; 125; 160; 200; 250; 315; 400; 500; 630; 720; 800; 1000];
Force = [250; 300; 300; 350; 400; 400; 400; 400; 400; 400; 400; 400];
Max_force = [500; 600; 600; 700; 800; 800; 1000; 1000; 1000; 1000; 1000; 1000];

# Create table
tab = table(Length, Force, Max_force);
prettyprint ( subsetrows(tab, : ) )
这是我得到的错误

error: : method 'subsetrows' has private access and cannot be run in this context
error: called from
    Tablicious_table_practice at line 12 column 1

如何像在SQL中那样过滤表数据?

似乎
子窗口
是一个私有变量。其作用是在内部实现表的“子集”操作

这意味着您可以使用普通索引/下标/范围,就像在普通数组中一样:

octave:10> prettyprint ( tab(:,:) )
------------------------------
| Length | Force | Max_force |
------------------------------
| 100    | 250   | 500       |
| 125    | 300   | 600       |
| 160    | 300   | 600       |
| 200    | 350   | 700       |
| 250    | 400   | 800       |
| 315    | 400   | 800       |
| 400    | 400   | 1000      |
| 500    | 400   | 1000      |
| 630    | 400   | 1000      |
| 720    | 400   | 1000      |
| 800    | 400   | 1000      |
| 1000   | 400   | 1000      |
------------------------------

octave:11> prettyprint ( tab(3:6, :) )
------------------------------
| Length | Force | Max_force |
------------------------------
| 160    | 300   | 600       |
| 200    | 350   | 700       |
| 250    | 400   | 800       |
| 315    | 400   | 800       |
------------------------------

octave:12> prettyprint ( tab(3:6, {'Max_force', 'Length'} ) )
----------------------
| Max_force | Length |
----------------------
| 600       | 160    |
| 700       | 200    |
| 800       | 250    |
| 800       | 315    |
----------------------