小编Chr*_*ndo的帖子

在MATLAB中包含多个条件语句的对话框

我正在写一个程序,我走到了尽头.

该计划开始询问:

button = questdlg('Would you like to train or test the network?', ...
'Artificial Neural Network', 'Train', 'Test', 'Exit', 'Exit');
if strcmp(button,'Train') ... 

elseif strcmp(button,'Test') ...

elseif strcmp(button,'Exit') ...
Run Code Online (Sandbox Code Playgroud)

但是我也想要它

    button = questdlg('Would you like to train or test the network?', ...
    'Artificial Neural Network', 'Train', 'Test', 'Exit', 'Exit');

    if strcmp(button,'Train') ... %do that thing 

    %but if the user wants to retrain in again I want to ask again
    A = questdlg('Would you like to retrain or test the …
Run Code Online (Sandbox Code Playgroud)

matlab if-statement

0
推荐指数
1
解决办法
639
查看次数

标签 统计

if-statement ×1

matlab ×1