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 CenterFile Exchange에서 Spline Postprocessing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by