Octave提交Coursera机器学习作业问题

Octave提交作业第一次遇到了问题

主要就是找不到ex1文件夹里面的子文件夹lib里面的文件

经过分析,应该是由于ex1加入路径以后并没有把子文件也加入路径,才导致提示一些文件不存在。把lib文件夹加入以后就可以顺利提交了

在这个过程中用到了几个命令

>> pwd
ans = E:\mooc\my-learning\machine-learning-ex2\ex2

pwd是用来打印当前路径的

>> addpath(pwd)

然后添加路径用addpath语句,最后如果需要保存路径呢?

>> help savepath
'savepath' is a function from the file C:\Octave\OCTAVE~1.2\share\octave\4.2.2\m\path\savepath.m

 -- savepath ()
 -- savepath (FILE)
 -- STATUS = savepath (...)
     Save the unique portion of the current function search path that is
     not set during Octave's initialization process to FILE.

     If FILE is omitted, Octave looks in the current directory for a
     project-specific '.octaverc' file in which to save the path
     information.  If no such file is present then the user's
     configuration file '~/.octaverc' is used.

     If successful, 'savepath' returns 0.

     The 'savepath' function makes it simple to customize a user's
     configuration file to restore the working paths necessary for a
     particular instance of Octave.  Assuming no filename is specified,
     Octave will automatically restore the saved directory paths from
     the appropriate '.octaverc' file when starting up.  If a filename
     has been specified then the paths may be restored manually by
     calling 'source FILE'.

     See also: path, addpath, rmpath, genpath, pathdef.
这是对savepath的命令帮助,注意里面写的,如果没有路径,会存到octaverc
>> savepath
warning: savepath: current path saved to ~\.octaverc
执行命令后发现确实存储了,但是这个文件在哪里还没找到 待续


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 6
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值