Can anyone help me plz ???
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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)
0 Commenti
Risposta accettata
Wayne King
il 3 Lug 2013
Modificato: Wayne King
il 3 Lug 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 Commenti
Jan
il 4 Lug 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];
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Data Exploration in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!