Creating 2d grid from cell array of data points
13 ビュー (過去 30 日間)
古いコメントを表示
Hi All, I am trying to create a 2-d grid of x and y locations for certain data points I have organized in a cell array. Each component of the cell array is an ordered pair. I want to plot each ordered pair on a grid, but I am very very new to matlab and haven't had much luck looking through the "Help" or internet searches. Literally I think this should just be some sort of scatter plot, but the command does not seed to work on my end. I feel as though this must be very easy to do. Any suggestions?
Thanks, Garrett
0 件のコメント
採用された回答
Andrew Newell
2011 年 7 月 19 日
If your cell array is c, you could use
x = cell2mat(c(:));
plot(x(:,1),x(:,2),'.')
The colon operator in c(:) makes c into a column vector, so x is a matrix with 2 columns.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!