movesingledisk.m
来自「使用matlab仿真汉诺塔的搬运情况」· M 代码 · 共 10 行
M
10 行
function answer_b = MoveSingleDisk(start, finish, answer)
tmp=size(answer);
step=int2str(tmp(1));%change the integer to the string, used for later "strcat"
%the following is all for the consistence of the arrays
if tmp(1)<10
line=strcat(step,'. Move',start,' to ',finish);
else
line=strcat(step,'.Move',start,' to ',finish);
end
answer_b=[answer;line];%write the new step to the final answer
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?