How to get sub-circles from orignal circle
Mostra commenti meno recenti
Hi,
I have circle with diameter 1, I use below code:
meshgrid(x,y)
Fig,surf(x,y,z,'facecolor','interp','edgecolor',none);view(2)
xlim([0 1]),ylim([0 1))
colorbar;colormap(hot);
Now I want plot a circle
figure2. Keep original circle diameter 0-0.39 from bottom as it is, and fill rest of the original area with black color
Figure3: Keep original circle diameter 0.39~1 (up or top) as it is, and fill rest of the original area with black color
Figure4: Keep original circle diameter 0~63 from left as it is, and fill rest of the original area with black color
Figure5: Keep original circel diameter 0.4~1 to right as it is,and fill rest of the original area with black color
Kindly some help to do this.
4 Commenti
Please format your code (highlight code and press alt+enter). Also, if it's possible to supply example values for x and y or at least provide a screen shot of the initial figure, that would be helpful. Otherwise we're giving advice based on estimates produced in our imagination.
Image Analyst
il 23 Mar 2019
Modificato: Image Analyst
il 23 Mar 2019
Mekela, are you still there? Where'd you go?
You still have posted no screenshots (figures 2 through 5) (by using the green "insert image" icon) -- so you still have no answers .... Is this your homework?
Why are you using surf()? What are x, y, and z? Why are you calling meshgrid()? And even if you did call meshgrid(), why are you not accepting/storing any output it generates?
If you're talking about colors in certain radius ranges (i.e. a thick ring) then why aren't you using images, (like with the imshow() function) to show the colors, instead of using the surf() function to make a 2.5-D topographic-style visualization?
The color in the ring/range is black but what is the color outside the range?
Mekala balaji
il 24 Mar 2019
Mekala balaji
il 24 Mar 2019
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Surface and Mesh Plots in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

