Color filling between lines in figure
    2 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
Hi! 
I have a plot where the intersection of some lines form a shape, and I'd like to fill in this area with a color to show a feasible domain!
Could someone indicate how I can do that? Thank you!
Below is the code I used to plot and the figure. 
contour(D, d, fobj, 'r')
xlabel('Coil diameter D (m)'), ylabel('Wire diameter d (m)'), ...
   title('Figure 1: Spring mass optimization problem (Exercise 6.1)')
hold on
contour(D, d, g1, [0.0 0.0])
contour(D, d, g2, [0.0 0.0])
contour(D, d, g3, [0.0 0.0])
contour(D, d, g4, [0.0 0.0])
contour(D, d, g5, [0.0 0.0])
0 Commenti
Risposte (1)
  KSSV
      
      
 il 1 Giu 2020
        Use this https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections?focused=5165138&tab=function to get the intersection points and use patch to color. 
2 Commenti
Vedere anche
Categorie
				Scopri di più su Vector Fields in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

