[FONT=Courier New][SIZE=2]
T1=input ([/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0]'Introduza valor da temperatura do ar interior, T1: '[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]);
T2=input ([/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0]'Introduza valor da temperatura do ambiente exterior, T2: '[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]);
W=input ([/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0]'Introduza o número de paredes, W: '[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]);
[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]while[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#000000](W<=0 | W>4) [/COLOR]
W=input ([/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0]'Introduza valor correcto para o número de paredes, W: '[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]);
[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]end
for[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#000000] I=1:W[/COLOR]
A(I)=input (strcat([/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0]'Introduza a área da parede, A('[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2],num2str(I),[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0]'): '[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]));
n(I)=input (strcat([/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0]'Introduza o número de camadas da parede, n('[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2],num2str(I),[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0]'): '[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]));
[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff] while[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2](n<1 | n>3)
n(I)=input (strcat([/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0]'Introduza um valor correcto para o número de camadas da parede, n('[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2],num2str(I),[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0]'): '[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]));
[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff] end
[/COLOR][/SIZE][/FONT][FONT=Courier New][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff] for[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] c=1:n(I)
L(c)=input (strcat([/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0]'Introduza a largura(L) da camada n('[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2],num2str(c),[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0]') da parede W('[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2],num2str(I),[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0]'), L: '[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]));
K(c)=input (strcat([/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0]'Introduza o valor da condutibilidade térmica(K) da camada n('[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2],num2str(c),[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0]') da parede W('[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2],num2str(I),[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0]'), K: '[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]));
[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff] end
end[COLOR=white]