필터 지우기
필터 지우기

Circle interpolation (calculate the values inside)

조회 수: 9 (최근 30일)
martin martin
martin martin 2019년 3월 15일
답변: Rik 2019년 3월 15일
Good evening,
I have a few more theoretical questions. Do you have any tips on how to calculate values inside a circle? I have a values, but these values are in vector:
values = 1:100;
I would like to place this value around the perimeter of the circle, then calculate the center of gravity. And then he calculated the points inside the circle as a perimeter value against the center of gravity value. The goal is to fill all the points in the ring, is that possible?
Or can you give me tips on some books or solutions?

채택된 답변

Rik
Rik 2019년 3월 15일
If you want to fill a circular area with a particular color, you can use this code:
center=[10,20];%xy coordinates of the center
radius=15;
figure(1),clf(1)%create a new figure (or bring focus to an old one and clear it)
theta=linspace(0,2*pi,100);
x=radius*cos(theta)+center(1);
y=radius*sin(theta)+center(2);
patch(x,y,'r')
daspect([1 1 1])%make data scale rectangular

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by