필터 지우기
필터 지우기

how to access elements from matrix

조회 수: 1 (최근 30일)
subha
subha 2013년 12월 3일
답변: Walter Roberson 2013년 12월 3일
I have 4 different matrix. For my process i need to take one element from 4 matrix and have to form a vector. For example, a=[0.1 0.2 0.3; 0.4 0.5 0.6; 0.5 0.6 0.7],b=[0.1 0.2 0.3; 0.4 0.5 0.6; 0.3 0.4 0.5],c=[0.2 0.3 0.4; 0.4 0.5 0.6; 0.4 0.5 0.6]. Now for my process i need to access and form a vector: [ a[i][j],b[i][j],c[i][j] ],for ex [a[1,2] ,b[1,2], c[1,2]].

채택된 답변

Walter Roberson
Walter Roberson 2013년 12월 3일
[a(i,j), b(i,j), c(i,j)]

추가 답변 (1개)

Andrei Bobrov
Andrei Bobrov 2013년 12월 3일
M = cat(3,a,b,c);
ii = 1;
jj = 2;
out = squeeze(M(ii,jj,:));

카테고리

Help CenterFile Exchange에서 Matched Filter and Ambiguity Function에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by