フィルターのクリア

How create plot in gui axes from matrix?

3 ビュー (過去 30 日間)
hawk5577
hawk5577 2018 年 11 月 15 日
回答済み: TADA 2018 年 11 月 15 日
How create plot in gui axes from matrix?
A = [1 0
2 5
3 6]
w = findobj('Tag', 'axes1');
plot(w,A)
Its wrong ;/

採用された回答

TADA
TADA 2018 年 11 月 15 日
depends on how you want to plot that matrix, and on what do you mean by its wrong.
When you plot a mtrix by simply calling
plot(A)
it'll plot a line for each column.
If you send axes it'l do the same in those axes
plot(gca, A)
now If there is no object called axes1, you will send an empty array to plot, and there will be an error.
If what you are trying to do is to take one column as x coordinates and the other as y coordinates do that:
plot(w, A(:,1), A(:,2))

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeVisual Exploration についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by