Matlab adds a folder to the function search directory

Introduction

The reason why you need to add a folder to the environment variable is because you need to call a function in another folder.
Method 1, add path and sub-file path

addpath(genpath('D:\Codes')) 

Method 2, no sub-file path can be directly through the following methods

addpath('D:\Codes')

Guess you like

Origin blog.csdn.net/wokaowokaowokao12345/article/details/109963840