How can i set input command for undefined variable?

2 visualizaciones (últimos 30 días)
Triveni
Triveni el 8 de Ag. de 2016
Respondida: Walter Roberson el 8 de Ag. de 2016
I have a input.
x_ang = [0 0 15 15 30, fliplr([0 0 15 15 30])];% [X,NN] = RunLength(x_ang);
it = 10; x=4;y=10;
if a comment on x_ang,
%x_ang = [0 0 15 15 30, fliplr([0 0 15 15 30])];% [X,NN] = RunLength(x_ang);
and if "x_ang" is not available, then i want to input automatically x_ang, then how can i make condition for this?

Respuesta aceptada

Walter Roberson
Walter Roberson el 8 de Ag. de 2016
if ~exist('x_ang', 'var')
x_ang = input('Enter x_ang values');
end

Más respuestas (0)

Categorías

Más información sobre Multidimensional Arrays en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by