フィルターのクリア

How can I display a matrix as a figure?

115 ビュー (過去 30 日間)
Abdullah Türk
Abdullah Türk 2019 年 4 月 28 日
コメント済み: Stephen Schoenefeldt 2023 年 12 月 12 日
Hello,
I have a 4x5 matrix. It is below:
a=
4 7 1 15 16
3 5 9 14 17
18 8 10 11 13
19 20 6 12 2
I want to display this matrix as a figure? How can I do this? Somebody says you can use same command suc as unitable or imagesc but I can't.
Thanks.

採用された回答

Adam Danz
Adam Danz 2019 年 4 月 28 日
編集済み: Adam Danz 2019 年 4 月 29 日
"Somebody says you can use same command such as uitable or imagesc but I can't."
This should get you started.
imagesc()
More info for imagesc(): https://www.mathworks.com/help/matlab/ref/imagesc.html
a=[
4 7 1 15 16
3 5 9 14 17
18 8 10 11 13
19 20 6 12 2];
figure()
imagesc(a)
uitable()
figure
uitable('Data', a)
ans =
Table with properties: Data: [4×5 double] ColumnWidth: 'auto' ColumnEditable: [] CellEditCallback: '' Position: [20 20 300 300] Units: 'pixels' Use GET to show all properties
  1 件のコメント
Stephen Schoenefeldt
Stephen Schoenefeldt 2023 年 12 月 12 日
ur a bot
this does not work

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by