Borrar filtros
Borrar filtros

questdlg box variable prompt

3 visualizaciones (últimos 30 días)
Tomas
Tomas el 28 de Abr. de 2012
Hello, is it possible to make the number of prompts variable? E.g.
a=4;
prompt={'1','2','3','4'} %input count depends on a.
title=('title');
v=questdlg(prompt, title, 1);
c(a,1)=str2num(v{1},v{2},v{3},v{4})

Respuesta aceptada

Walter Roberson
Walter Roberson el 28 de Abr. de 2012
prompt = cellstr(num2str((1:a).'));
Please note the .' of the 1:a vector: it is required in order to for num2str() to work properly for this situation.

Más respuestas (0)

Categorías

Más información sobre Dialog Boxes en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by