How to remap all negative and positive value in 0 to 1 scale in polar plot?

조회 수: 5 (최근 30일)
Hi,
I am wondering how to remap all positive and negative values into 0-1 scale in polar plot?
The values I have look like:
from 0 to 1/2 pi, r=0.5,
from 1/2 pi to pi, r= -0.2
from pi to 2/3 pi, r= -0.3
from 2/3 pi to pi, r=0.1,
without remapping, the negative value will go to the opposite region (i.e. the value -0.2 supposed to be in 1/2 pi to pi region but will map in the opposite region 3/2 pi to pi,
so I want to remap all values, including negative and positive values, into 0-1 scale, so that all value will stay in their assigned region.
Is there any way to do it?
Thanks,
Cece

채택된 답변

Thorsten
Thorsten 2016년 7월 7일
편집: Thorsten 2016년 7월 7일
r = [0.5 -0.2 -0.3 0.1];
r = r - min(r);
r = r/max(r);

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by