フィルターのクリア

How to display elements of Matrix by entering coordinates

1 回表示 (過去 30 日間)
Sahil Bajaj
Sahil Bajaj 2015 年 11 月 29 日
回答済み: Star Strider 2015 年 11 月 29 日
I want to display elements of a matrix by entering coordinates in the command window
Example:
1 0 0
0 1 0
0 0 1
if I enter disp(x(2,2));
I want to get 1

採用された回答

Star Strider
Star Strider 2015 年 11 月 29 日
You have to assign the matrix to ‘x’ first:
x = [1 0 0
0 1 0
0 0 1];
disp(x(2,2))
1

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeElementary Math についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by