Add a function to Matlab path

旧巷老猫 提交于 2019-12-06 02:13:54

strsplit is not a matlab function, in the sense that it does not come with MATLAB, your link is to the mathworks file exchange which is a community of MATLAB users.

You can use the dialog box in the "File"->"Set Path" menu to add the file to your path.
This is assuming you have actually the file and for some reason it is not on your path.

From the information you provide and from Matlab's documentation strsplit is not an intrinsic Matlab function. So the question for you is Where have you installed the source of the strsplit function ? When you've answered that for yourself use the File | Set Path menu.

Obviously, as others have said, you need to make sure the file actually exists in some directory on your computer. If you need to use this file in a script, you can use the following line to add this file's particular location to your path.

path(path,'c:\example\fileishere');

In order to confirm that it is in the path, try to run which to discover where it is located

 which('strsplit')

Maybe I'm not seeing the problem.

  1. So you download the function?

  2. And with matlab you changed in the directory where it is. Then it's in your current path. Then it's in your path as long as you are in that dir. Or you use the "add to path" from the file menu.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!