필터 지우기
필터 지우기

I want to get Y = 906*1 but I got 2880

조회 수: 3 (최근 30일)
Rui Mauaie
Rui Mauaie 2018년 11월 15일
편집: madhan ravi 2018년 11월 15일
n1a=960;
n1b=960;
n2=960;
load Normal
load fault1
load fault3
X=[Normal fault1 fault3];
Y=[ones(n1a+n1b,1);2*ones(n2,1)];
I got this error
Matrix dimensions must agree.
Error in LFDA (line 48)
Xc=X(:,Y==c);
line 48 is :
for c=unique(Y')
Xc=X(:,Y==c);
nc=size(Xc,2);
  댓글 수: 4
Rui Mauaie
Rui Mauaie 2018년 11월 15일
편집: Rui Mauaie 2018년 11월 15일
sorry guys I got it, thanks for your attention but answer was
X=X';
Y=[ones(n1a,1);2*ones(n1b,1);3*ones(n1b,1)];
madhan ravi
madhan ravi 2018년 11월 15일
편집: madhan ravi 2018년 11월 15일
your most welcome to post your solution as an answer in answer section so that people who have similar problem will find it helpful

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

답변 (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