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
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 Exchange에서 Matrices 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