Borrar filtros
Borrar filtros

what's wrong with my program?

3 visualizaciones (últimos 30 días)
Ayob
Ayob el 24 de Abr. de 2013
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.

Respuesta aceptada

Image Analyst
Image Analyst el 24 de Abr. de 2013
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.

Más respuestas (0)

Categorías

Más información sobre Argument Definitions en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by