How i display matrix ?

148 次查看(过去 30 天)
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
  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 CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by