Question

I am trying to add the strsplit function to my MATLAB path, but I don't know how to do it.

Link : strsplit function

I am trying to use the function for my work, but somehow that function does not exist in my version of MATLAB that i currently have.

Was it helpful?

Solution

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.

OTHER TIPS

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.

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

 which('strsplit')

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');

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top