Assigning values and classification/grouping
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Descriptive Statistics and Visualization dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!