我开始使用MatLab并遇到设置路径的问题。
%% Set path and file name %Set main folder
defaultFolder=fileparts(fileparts(mfilename('/Users/s2986149/Desktop/MTP/Exported_STL_files/scaphoid_lunate_sl_ligament_smooth.stl')));
pathName=fullfile(defaultFolder,'MTP','Exported_STL_files');
% File name for STL
fileName=fullfile(pathName,'scaphoid_lunate_sl_ligament_smooth.stl');
%% Import a txt type STL file as patch data
[stlStruct] = import_STL(fileName);
Error using textscan
Invalid file identifier. Use fopen to generate a valid file identifier.
Error in txtfile2cell (line 16)
T=textscan(fid,'%s','delimiter', '\n','Whitespace','');
Error in import_STL (line 16)
T=txtfile2cell(fileName);
Error in Meshing (line 17)
[stlStruct] = import_STL(fileName);
在终端机
$ pwd
/Users/s2986149/Desktop/MTP/Exported_STL_files
预先感谢 NataCalc