2-6 ??路?

be@`AmyTest.m ҦbؿOud:\matlabBook\MATLAB{]pGJg\02-챴MATLABvCpGiJoӥؿAMATLAB N䤣zn檺 M ɮסCpGƱ MATLAB צbB myTest.mANݱNud:\matlabBook\MATLAB{]pGJg\02-챴MATLABv[J MATLAB jM|]Search Path^WC

򥻤WAC MATLAB J@ӫO]Ҧp myTest^ɡABm{ǬG

  1. ˬd myTest O_ϥΪ̩wqܼơCYOAhΤFYOAiJUӨBJC
  2. ˬd myTest O_ä[`ơCYOAhΤFYOAiJUӨBJC
  3. ˬd myTest O_ثeؿ M ɮסCYOAhΤFYOAiJUӨBJC
  4. ˬd myTest O_jM|U M ɮסCYOAhΤFYOAiJUӨBJC
  5. YOAh MATLAB oX~TC

Yn˵ MATLAB w]wjM|AJ path OYiG

>> path MATLABPATH C:\Users\RogerJang\Documents\MATLAB C:\MATLAB\SupportPackages\R2014a\appdata_496a640efaac0abd C:\MATLAB\SupportPackages\R2014a\webcam C:\MATLAB\SupportPackages\R2014a\webcam\private\win64 ......

MAbùWݨҦǦ^jM|eA|̦UOϥΪ̩Ҧw˪uc]Toolboxes^PӦҮtC

Yund߬Y@SwOҦbjM|Ai which OAҦpG

>> which demo C:\MATLAB\R2014a\toolbox\matlab\helptools\demo.m >> cd(matlabroot); % MATLAB ڥؿ >> which fact01 fact01 not found.

M ud:\matlabBook\MATLAB{]pGJg\02-챴MATLABväb MATLAB jM|A] MATLAB 䤣 fact01.m o M ɮסG

nNؿud:\matlabBook\MATLAB{]pGJg\02-챴MATLABv[J MATLAB jM|Aiϥ addpath OG

>> addpath('d:\matlabBook\MATLAB{]pGJg\02-챴MATLAB'); ɥؿud:\matlabBook\MATLAB{]pGJg\02-챴MATLABvw[J MATLAB jM|]Ū̦ۤvJ path OլݬݡI^A] MATLAB wguݡvo fact01.mG >> which fact01 d:\matlabBook\MATLAB{]pGJg\02-챴MATLAB\fact01.m

{bڭ̴NiHIs fact01 oӨơAҦpnp 10!AiJ fact01(10)AӤiJ fact01.m ҦbؿC

pGbC@Ұ MATLAB An]wһݪjM|ANO@ܳ·ЪơCؤkAiH MATLAB ҰʫAYiJϥΪ̩wqjM|G

b MATLAB ROUAJucommand(string)vMucommand stringvOĪA]uaddpath('d:\matlabBook')viHguaddpath d:\matlabBookvC~Aaddpath Oq`Nؿ[ܷjM|eCYnNؿ[jMؿAiϥΡu addpath d:\matlabBook -endvCYnqjM|ؿAi rmpath OAҦpGurmpath d:\matlabBookvC

FϥΩROCӼWR|~Az]iHѡu|sv]i MATLAB pathtool OsX^ӶijM|sWβC

Pؿާ@OAiCXpUG

Is OS ROAib MATLAB ROUJĸ OS ROCҦpbLn@~tΤUAu!dirviN DOS ROudirvGqb MATLAB ROC


MATLAB{]pGJg