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 日

0 投票

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 日

1 投票

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 日

0 投票

Ki = [25 35, 56 41,85 78]
disp(Ki(:,2))

カテゴリ

ヘルプ センター および File ExchangeMatrices and Arrays についてさらに検索

質問済み:

2015 年 9 月 16 日

回答済み:

2019 年 11 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by