Can anyone help me plz ???

1 次查看(过去 30 天)
Anas Blue
Anas Blue 2013-7-3
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)

采纳的回答

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

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Visual Exploration 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by