Assigning values and classification/grouping

조회 수: 3 (최근 30일)
Pooneh Shah Malekpoor
Pooneh Shah Malekpoor 2021년 5월 5일
편집: KSSV 2021년 5월 5일
Hello
I am defining some slices in matlab (n is the number of slice and the curve in the figure is part of a circle), which have definite coordinates of base and i can calculate the length of the arc to the middle and end of each slice(black numbers) based on coordinates,,,However, there is another measure drawn by red....my code should be like if the length to the middle of a slice base is less than J=4, then those slices should be classified in segment 1, then from the end of the red arrow(length =4), the other calssification starts and those sliices whose length to the base midpoint (e.g. 6) lies between J=4 and 8 is classified in segment 2, etc. I have written a piece of code in this regard, however it neglects some remain of the arc in each segment so it does not give me accurate results for the final slices. Any help is highly appreciated.
i=1:n
z(i)=ceil(arc(i)/J); %arc(i) is the arc length from (4.59,0) to the midpoint of each slice base and J=4

답변 (0개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics and Visualization에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by