Problems about "rotate" function

6 Ansichten (letzte 30 Tage)
Francesco
Francesco am 14 Nov. 2020
Kommentiert: Matt J am 16 Nov. 2020
Hi!!
I'm experiencing the following problem.
k=2;
for i=2:length(t_inf_sgross)
b(k)=subtract(D(k-1),C2(k-1));
D(k)=rotate(b(k),Delta_phi(i));
k=k+1;
end
ruotato=rotate(b(end),-35)
plot(ruotato)
I'm creating a vector called "b" containing a series of polyshapes that results from the subtraction/rotation of geometries contained in "C" vector.
The problem is that when i call the final geometry resulted in "b" vector, then called "ruotato" and i rotate it of a certain angle (here -35°), Matlab seems to rotate only the perimeter but not the area of this geometry, giving the result i post below:
Why this happen?
Thank you!

Akzeptierte Antwort

Matt J
Matt J am 15 Nov. 2020
Bearbeitet: Matt J am 15 Nov. 2020
Presumably because b(end) is the perimeter, i.e., it is a polyshape containing almost no internal area.
  12 Kommentare
Francesco
Francesco am 16 Nov. 2020
Bearbeitet: Francesco am 16 Nov. 2020
I can’t post the entire plot because it’s a 785 MB file. I can’t plot only the last position because the final geometry is the result of multiple positions of the tool as function of time. As you said I’ll load the result in a separate window and there i’ll make my operations. The next topic will be how to lighten the code. It lasts 1 hour.. i will post it in another topic :)
Matt J
Matt J am 16 Nov. 2020
The next topic will be how to lighten the code. It lasts 1 hour.. i will post it in another topic :)
OK, but if we are done with this topic, please Accept-click the answer.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Elementary Polygons finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by