% Extract referenced model info mdls = args.buildInfo.ModelRefs; % Find the path of the directory code generation was started from startDir = args.buildInfo.Settings.LocalAnchorDir; % Initialize empty cell for path info paths = cell(size(mdls)); % Additional Code for the Relative Directory % Determine your current working directory currentDir = pwd; % Remove the starting directory from the current directory, this will leave % only the path from the starting directory to the current folder. pathFromAnchor = currentDir(2+length(startDir):end); % Extract all the folders between the starting directory and the current % directory folders = strsplit(pathFromAnchor,'\'); % Create the relative path to the start directory based on the number of % folders between the start and current directories. relativePath = repmat('../',1,length(folders)); % If there are model references loop over them and construct the path for % each reference if ~isempty(mdls) for i = 1:length(mdls) libname = mdls(i).Name; fullpath = replace(mdls(i).Path,'$(START_DIR)\', relativePath); paths{i} = [fullpath,'\',libname]; end end
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.