what's wrong with my program?
1 回表示 (過去 30 日間)
古いコメントを表示
I'm completely confused.I have a large program and Matlab announce an error that I don't know what that is.
for F=1:PE*AE*RE
GGP{F}=zeros(2,12);
for i=1:12
n=0;
[GGP{F}(2,i),GGP{F}(1,i)]=cart2pol(GG{F}(1,i),GG{F}(2,i));
for j=1:NodesTETA*NodesR*NodesZ
if abs((GGP{F}(1,i)-p{j}(1))/Radiale)<1 && abs((GGP{F}(1,i)-p{j}(2))/peripherale)<1 && abs((GG{F}(3,i)-p{j}(3))/Axiale)<1
n=n+1;
NODZ{F,i}(n)=j;
end
end
end
end
for F=1:PE*AE*RE
for i=1:12
*NODZ{F,i}=[3*NODZ{F,i}-2;3*NODZ{F,i}-1;3*NODZ{F,i}];*(line 193 error)
NODZ{F,i}=NODZ{F,i}(:)';
end
end
MATLAB error:
??? Undefined variable "NODZ" or class "NODZ".
Error in ==> ThesisMLS at 193
NODZ{F,i}=[3*NODZ{F,i}-2;3*NODZ{F,i}-1;3*NODZ{F,i}];
Although I had identify NODZ in the first loop but it's undefined yet.
0 件のコメント
採用された回答
Image Analyst
2013 年 4 月 24 日
Evidently your "if" statement never became true so you never got inside to do this line:
NODZ{F,i}(n)=j;
So NODZ is undefined when you try to use it later. I don't know why it didn't become true, all I know is it didn't.
1 件のコメント
Image Analyst
2013 年 4 月 24 日
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!