首页 > 解决方案 > MATLAB - 将路径中的最后一个文件夹保存为字符串?(句法)

问题描述

Ball='C:\----\--\Documents\----\ -----\ Ball - BEST';

给定目录的路径,如何将直接目录保存为字符串?

标签: matlabsyntaxpathdirectorycharacter

解决方案


您可以使用 UNIX 命令“pwd”

% On C:\----\--\Documents\----\ -----\ Ball - BEST directory
Ball = pwd;
% Ball = 'C:\----\--\Documents\----\ -----\ Ball - BEST'

推荐阅读