用于将若干字符串连接成一个完整的路径。
例如:
>> f=fullfile('D:','Matlab','example.txt')
f=D:\Matlab\example.txt
(在Windows中,“D:\”表示D盘,“D:”表示目录)
利用matlab读取指定路径下的图像
<span style="font-family:Times New Roman;">% 读入指定路径imgFolder下的图像imgName imgFolder = 'F:\博\快盘\图像+数据\images\文章实验图'; %指定路径 imgName = 'tile3_24.png'; %指定路径下的图像的名字 % read the image imgInput= imread(fullfile(imgFolder,imgName)); %读入图像</span>
<span style="font-family: 'Times New Roman';">== </span>
<span style="font-family: 'Times New Roman';">imgInput= imread(</span><span style="font-family: 'Times New Roman';">'F:\博\快盘\图像+数据\images\文章实验图\</span><span style="font-family: 'Times New Roman';">tile3_24.png</span><span style="font-family: 'Times New Roman';">'</span><span style="font-family: 'Times New Roman';">);</span>