Why is the code not implementing for i==6 value ?
Ältere Kommentare anzeigen
T = zeros(7,12);
for i = 1:7
for j = 1:12
if (i==1 || i==7)
T(i,j) = 1750;
end
if i==4 && (j>3 && j<9)
T(i,j) = 600;
end
if (i==2 || i==6) && (j>1 && j<11)
T(i,j) = (T(i+1,j)+T(i,j+1)+T(i-1,j)+T(i,j-1))/4;
end
end
end
Any help would be appreciated.
3 Kommentare
Aryaman
am 30 Sep. 2014
Image Analyst
am 1 Okt. 2014
See http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup. Also learn to use control-I to properly indent your code before pasting it in here (then highlighting and clicking {}Code button). And take Roger's good advice and paste your properly formatted code back here if you still have problems.
Aryaman
am 1 Okt. 2014
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Power Converters finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!