when I run this code I get Undefined function or variable 'U'.
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论
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
2018-11-6
By the way, i:i is a waste of time. Use i only.
回答(1 个)
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 个评论
Rui Mauaie
2018-11-6
Stephen23
2018-11-6
@Rui Mauaie: please show us the complete code that you used.
Jan
2018-11-6
@Rui Mauaie: And a copy of the complete error message.
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!