Created
September 2, 2016 05:12
-
-
Save drhirsch/880ed308bffe78646bfe2b93c62543aa to your computer and use it in GitHub Desktop.
makes 2-D pyramid phantom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
do: | |
N = 256; | |
MinVal = 0; | |
MaxVal = 2^16 -1; | |
data = nan(N); | |
temp = uint16(MinVal:round((MaxVal-MinVal)/(N/2)):MaxVal); | |
for i = 1:N/2 | |
data(i,i:end-i+1) = temp(i); | |
data(i:end-i+1,i) = temp(i); | |
data(end-i+1,i:end-i+1) = temp(i); | |
data(i:end-i+1,end-i+1) = temp(i); | |
end | |
figure, mesh(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment