フィルターのクリア

How i display matrix ?

148 ビュー (過去 30 日間)
ARJUN K P
ARJUN K P 2015 年 9 月 16 日
回答済み: Pranav Bansal 2019 年 11 月 4 日
my matrix is the form:
Ki = [25 35, 56 41,85 78]
i want print the like 35 or 41 or 78

採用された回答

Star Strider
Star Strider 2015 年 9 月 16 日
Firsgt, you need to change the commas to semicolons, then display the second column:
Ki = [25 35; 56 41; 85 78]
Display = Ki(:,2)
  2 件のコメント
ARJUN K P
ARJUN K P 2015 年 9 月 16 日
not for all values... 35 only or 41 only or 78 only
Star Strider
Star Strider 2015 年 9 月 16 日
Then you have to specify the row as well:
E12 = Ki(1,2) % Display ‘35’
E12 = Ki(2,2) % Display ‘41’
E12 = Ki(3,2) % Display ‘78’

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

その他の回答 (2 件)

Thorsten
Thorsten 2015 年 9 月 16 日
disp(Ki(:,2))
  2 件のコメント
ARJUN K P
ARJUN K P 2015 年 9 月 16 日
not for all values... 35 only or 41 only or 78 only
Thorsten
Thorsten 2015 年 9 月 16 日
disp(Ki(2))
disp(Ki(4))
disp(Ki(6))

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


Pranav Bansal
Pranav Bansal 2019 年 11 月 4 日
Ki = [25 35, 56 41,85 78]
disp(Ki(:,2))

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by