How to plot a matrix?

200 ビュー (過去 30 日間)
sono
sono 2012 年 9 月 25 日
コメント済み: Madalena Francisco 2023 年 1 月 14 日
I have a matrix I am trying to plot called "errors"
Best I can do is:
plotmatrix(errors,'b')
But that gives a weird mess of graphs:
The bottom left one is what I am shooting for.
Thank you.
  1 件のコメント
Tom
Tom 2012 年 9 月 25 日
編集済み: Tom 2012 年 9 月 25 日
Plot Matrix isn't a plot function for a matrix, it provides a matrix of different plots. You'll want to use the standard plot function, can you provide some sample data?

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

採用された回答

José-Luis
José-Luis 2012 年 9 月 25 日
編集済み: José-Luis 2012 年 9 月 25 日
Given your figure it looks like you have a two-column matrix. The bottom left plot one is given by:
plot(your_data(:,1),your_data(:,2));
The top right:
plot(your_data(:,2),your_data(:,1));
The diagonals:
hist(your_data(:,1));
hist(your_data(:,2));
You get the idea...
  1 件のコメント
Madalena Francisco
Madalena Francisco 2023 年 1 月 14 日
Thank u! This help me plot my matrix

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

その他の回答 (1 件)

Sachin Ganjare
Sachin Ganjare 2012 年 9 月 25 日
Use "hold on" or "hold all" command
Hope it helps!!!

カテゴリ

Help Center および File ExchangeSpline Postprocessing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by