how to extract the first three elements present in each row of a matrix

조회 수: 75 (최근 30일)
A=[0.7849 0.7472 0.6991 0.6754 0.5707 0.4462 0.3210 0.2955 0.1318;
0.9037 0.8296 0.7963 0.5718 0.4657 0.2708 0.2605 0.1518 0.1235;
0.9085 0.8479 0.8222 0.6896 0.4416 0.2860 0.2790 0.2278 0.1909]
Could anyone help me to extract the first three elements present in each row such that the result should be
B=[0.7849 0.7472 0.6991
0.9037 0.8296 0.7963
0.9085 0.8479 0.8222]

채택된 답변

Catalytic
Catalytic 2019년 3월 28일
B=A(:,1:3)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by