필터 지우기
필터 지우기

Color filling between lines in figure

조회 수: 1 (최근 30일)
GCats
GCats 2020년 6월 1일
댓글: KSSV 2020년 6월 2일
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])

답변 (1개)

KSSV
KSSV 2020년 6월 1일
  댓글 수: 2
GCats
GCats 2020년 6월 2일
it gives me a 2x1 row vector with all zeros?
KSSV
KSSV 2020년 6월 2일
Atatch the data and code you have tried.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by