필터 지우기
필터 지우기

How i display matrix ?

조회 수: 118 (최근 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일
  댓글 수: 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