필터 지우기
필터 지우기

accessing the element for the matrix but that elemnt is in the form of row vector

조회 수: 2 (최근 30일)
VASUNDHARA V
VASUNDHARA V 2022년 2월 22일
댓글: DGM 2022년 2월 22일
accessing the element for the matrix but that elemnt is in the form accessing the element for the matrix but that elemnt is in the form of row vectorof row vector .eg
A=[ d(1,:) d(5,:) d(1,:)
d(1,:) d(4,:) d(6,:)]
and d=[111111
111111
111111
111111
111111
111111]
so code is
For j=1:6
temp1=A(j)
so it will generate a result as 111111 only not a single 1 at j=1.
your help is highly appreciated
  댓글 수: 1
DGM
DGM 2022년 2월 22일
I don't know what you're asking for, least of all because the code already does what you appear to be asking.
d = [111111
111111
111111
111111
111111
111111]
d = 6×1
111111 111111 111111 111111 111111 111111
A = [d(1,:) d(5,:) d(1,:)
d(1,:) d(4,:) d(6,:)]
A = 2×3
111111 111111 111111 111111 111111 111111
for j = 1:6
temp1 = A(j)
end
temp1 = 111111
temp1 = 111111
temp1 = 111111
temp1 = 111111
temp1 = 111111
temp1 = 111111

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by