matrix plotting

5 ビュー (過去 30 日間)
Zach
Zach 2011 年 5 月 17 日
If I have a matrix x=[1 2 3 4] and a vector y=[1 4 9 16] and make the matrix z=[x; y] what is the equivalent matrix plot of z to scatter(x,y).

採用された回答

Sean de Wolski
Sean de Wolski 2011 年 5 月 17 日
scatter(z(1,:),z(2,:))
or
scatter(z(1:2:end),z(2:2:end))
%Sorry misread your inputs
  1 件のコメント
Zach
Zach 2011 年 5 月 17 日
For that to work it would have to be scatter(z(1:(numel(z)/2)),z((numel(z)/2)+1:end)) but that's not what I'm trying to plot. I want to row 1 vs. row 2. Is there a way to call the row of a matrix?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by