drswitch.m

来自「用MATLAB进行海洋水团的模拟程序」· M 代码 · 共 24 行

M
24 行
字号
function drswitch(a)%DRSWITCH.M: utility for omp2, allows directory change during programm executioni = 'y';while i == 'y'	disp('  ')	disp([a ' your current work directory, which is'])	disp(['  ' pwd])	disp('  ')	disp('This directory contains the following directories/folders and files:')	dir	disp('  ')	i = 'n';	incontrol = input('Do you want to change directory (y/n)? [n]  ','s');	if length(incontrol) > 0 i = incontrol; end	if i == 'y'		chdir = '..';		incontrol = input('Change to which directory: [..]  ','s');		if length(incontrol) > 0 chdir = incontrol; end		newdir = ['cd ' chdir];		eval(newdir);	endend

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?