Prev: Problem with BIC
Next: summing up with time intervals
From: Mohammad on 2 Jul 2010 18:05 Hi Guys, I have a program that will create a matrix with ones and zeros, where ones are part of a lens, and zeros aren't. When I run the program, I can access the matrix I created by clicking the matrix list on the side, but I don't know how to get the matrix to "pop up" after I run the program. I also wouldn't mind if there was something like pcolor that would let me have the ones colored differently than the 0's. Thanks! Cordially, Mohammad (here's the code below:) h = 8; R = 5.3571 d = 3.5873 r = 1/20 m = h/r; l = 2*(R-d/2)/r; mat = zeros(m,l); for t = 1:m; for y = 1:l; if sqrt((m/2-t)^2+y^2)<R/r; if sqrt((m/2-t)^2+(l-y)^2)<R/r; mat(t,y) = 1; end end end end
From: Mohammad on 2 Jul 2010 18:22 on second thought, there is pcolor... thanks anyway :)
|
Pages: 1 Prev: Problem with BIC Next: summing up with time intervals |