Can anyone help me plz ???

I wrote this code but I can't plot anything and there
prompt={'Enter Th Number Of Lines:'};
title='Draw Line ';
n=inputdlg(prompt);
A= cell2mat(n);
[x,y] = ginput(A);
plot(x,y)

 Respuesta aceptada

Wayne King
Wayne King el 3 de Jul. de 2013
Editada: Wayne King el 3 de Jul. de 2013

0 votos

prompt={'Enter The Number Of Lines:'};
title='Draw Line ';
n=inputdlg(prompt);
A = str2num(cell2mat(n));
[x,y] = ginput(A);
plot(x,y)

3 comentarios

Anas Blue
Anas Blue el 3 de Jul. de 2013
Thanks dude
Anas Blue
Anas Blue el 4 de Jul. de 2013
Bro can I save the (x, y) in array or each one of them in a single array ??? And thanks
Jan
Jan el 4 de Jul. de 2013
"title" is a Matlab command and shadowing it by a variable can cause unexpected troubles.
A simplification:
A = sscanf(n{1}, '%d');
You can store x and y in one array:
data = [x, y];

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Data Exploration en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 3 de Jul. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by