main.m

来自「使用matlab仿真汉诺塔的搬运情况」· M 代码 · 共 7 行

M
7
字号
function main
clear;
answer='The steps is:     ';%the blankets here is for the consistence of the dimensions of array.
response = input('input   the   number   of   diskes:');%ask the user to input the number of diskes
n = response;
answer_b=MoveTower(n, ' Src', ' Dst', ' Aux', answer);%The details of steps is in answer_b, it will be showed at last
answer_b %show the details of steps

⌨️ 快捷键说明

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