Author: Not specified Language: matlab
Description: Not specified Timestamp: 2017-10-11 04:52:40 +0000
View raw paste Reply
  1. %Assignment1 PartB
  2.  
  3. %Comb phantom with resolution (-10:0.1:10)
  4. [xmat,ymat] = meshgrid(-10:0.1:10);
  5. o = ones([201 10]);
  6. z = zeros([201 10]);
  7. temp = [o z];
  8. phantom = repmat(temp,[1 10]);
  9. phantom = [phantom, zeros(201, 1)];
  10. mesh(xmat, ymat, phantom);
  11. title('First Comb Phantom with Resolution of (-10:0.1:10)');
  12.  
  13. %Comb phantom with resolution (-20:0.1:20)
  14. [xmat, ymat] = meshgrid(-20:0.1:20)
  15. o = ones([401 10]);
  16. z = zeros([401 10]);
  17. temp = [o z];
  18. phantom = repmat(temp,[1 20]);
  19. phantom = [phantom, zeros(401,1)];
  20. mesh(xmat, ymat, phantom);
  21. title('Second Comb Phantom with Resolution of (-20:0.1:20)');
  22.  
  23. %Comb phantom with resolution (-30:0.1:30)
  24. [xmat,ymat] = meshgrid(-30:0.1:30);
  25. o = ones([601 10]);
  26. z = zeros([601 10]);
  27. temp = [o z];
  28. phantom = repmat(temp,[1 30]);
  29. phantom = [phantom,   zeros(601,1)];
  30. mesh(xmat, ymat, phantom);
  31. title('Third Comb Phantom with Resolution of (-30:0.1:30)');
  32.  
  33.  
View raw paste Reply