首页 > 解决方案 > 即使在正确的路径中,八度也找不到文件

问题描述

我正在编写一个简单的 octave 程序,但我无法通过 octave-cli 运行它
我已将 octave 放入环境变量中,但它仍然无法运行
这是我在 octave-cli 中键入的命令,它表明我没有一个文件名'question1.m',但使用ls命令,它告诉我它在路径中有文件。

GNU Octave, version 6.3.0
Copyright (C) 2021 The Octave Project Developers.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "x86_64-w64-mingw32".

Additional information about Octave is available at https://www.octave.org/.

Please contribute if you find this software useful.
For more information, visit https://www.octave.org/get-involved.html

Read https://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.

octave:1> pwd
ans = C:\Users\6720\OneDrive?﹝\GitHub\octave-lab\lab03
octave:2> ls
 磁碟區 C 中的磁碟沒有標籤。
 磁碟區序號:  76E5-73EB

 C:\Users\6720\OneDrive文档\GitHub\octave-lab\lab03 的目錄

[.]             .gitignore      ie-lab-3.pdf    IE_Encode.m     IE_Sampling.m   question2.m     s3.m
[..]            demo.wav        IE_Decode.m     IE_Quant.m      question1.m     s2.m
              11 個檔案       1,887,210 位元組
               2 個目錄  76,459,147,264 位元組可用
octave:3> question1
error: no such file, 'C:\Users\6720\OneDrive??\GitHub\octave-lab\lab03\question1.m'
octave:4>

这是我的程序代码:

# question1.m
[x, fs] = audioread('demo.wav');
m = IE_Sampling(x, fs, 4000);
m = IE_Sampling(x, fs, 80000);
# When M = 4
M = 4;
[s, lv] =IE_Quant(m, M);
subplot(3,1,1);
plot(s,"b;s[n];",m,"k;m[n];")
xlim([0,1000])
title("s[n] and m[n] with M = 4")
# When M = 8
M = 8;
[s, lv] =IE_Quant(m, M);
subplot(3,1,2);
plot(s,"b;s[n];",m,"k;m[n];")
xlim([0,1000])
title("s[n] and m[n] with M = 8")
# When M = 16
M = 16;
[s, lv] =IE_Quant(m, M);
subplot(3,1,3);
plot(s,"b;s[n];",m,"k;m[n];")
xlim([0,1000])
title("s[n] and m[n] with M = 16")

谁能告诉我如何解决它?

标签: windowswindowoctavegnu

解决方案


推荐阅读