필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

when I run this code I get Undefined function or variable 'U'.

조회 수: 1 (최근 30일)
Rui Mauaie
Rui Mauaie 2018년 11월 4일
마감: MATLAB Answer Bot 2021년 8월 20일
for i=1:n
h=u(1:n,i:i);
b=a(i,1);
if b>0.0001
U(1:n,i:i)=h/sqrt(b);
end
end
[N,M]=size(U);
  댓글 수: 1
Jan
Jan 2018년 11월 6일
By the way, i:i is a waste of time. Use i only.

답변 (1개)

Bruno Luong
Bruno Luong 2018년 11월 4일
MATLAB makes distinction between upper case and lower case in variable name. If you call
[u,d,v]=svd(K);
then you have to use small u afterwards, or the opposite.
  댓글 수: 4
Jan
Jan 2018년 11월 6일
@Rui Mauaie: And a copy of the complete error message.
Bruno Luong
Bruno Luong 2018년 11월 6일
He also deleted the code he posted previously making my comment difficult to understand.

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by