Can anyone help me plz ???

1 vue (au cours des 30 derniers jours)
Anas Blue
Anas Blue le 3 Juil 2013
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)

Réponse acceptée

Wayne King
Wayne King le 3 Juil 2013
Modifié(e) : Wayne King le 3 Juil 2013
prompt={'Enter The Number Of Lines:'};
title='Draw Line ';
n=inputdlg(prompt);
A = str2num(cell2mat(n));
[x,y] = ginput(A);
plot(x,y)
  3 commentaires
Anas Blue
Anas Blue le 4 Juil 2013
Bro can I save the (x, y) in array or each one of them in a single array ??? And thanks
Jan
Jan le 4 Juil 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];

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Data Exploration dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by