Subdomain Posts
MatLab | 385 days ago
MatLab | 385 days ago
MatLab | 388 days ago
None | 831 days ago
Recent Posts
PHP | 1 sec ago
None | 4 sec ago
None | 10 sec ago
None | 18 sec ago
None | 27 sec ago
PHP | 36 sec ago
None | 54 sec ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
By Anonymous on the 27th of Feb 2009 04:38:48 PM
Download |
Raw |
Embed |
Report
A = [0,0,1;0,1,1;0,0,0];
for c = 1:1:(a-1)
for d = 1:1:(b-1)
adjacent_counter = 0;
for m = -1:1:1
for n = -1:1:1
row_adjacent = m + c;
col_adjacent = n + d;
if ( ( row_adjacent > 0 ) & ( col_adjacent > 0 ) )
if ( A(row_adjacent,col_adjacent) == 1 )
adjacent_counter = adjacent_counter + 1;
end
end
end
end
if adjacent_counter >= 3
A(c,d) = 1;
end
adjacent_counter = 0;
end
end
Submit a correction or amendment below.
Make A New Post