フィルターのクリア

Question with rotating 2d vectors.

1 回表示 (過去 30 日間)
Matthew Lozancich
Matthew Lozancich 2017 年 11 月 4 日
編集済み: Roger Stafford 2017 年 11 月 4 日
So the questions ask to use the code I had generated before which is:
function test
z=zeros(1,101);
w=zeros(1,101);
m=1;
for t=0:3.6:360
w(m) = ((1 + cosd(5*t))*cosd(t));
z(m) = ((1 + cosd(5*t))*sind(t));
m=m+1;
end
plot(w,z,'b--')
axis(5*[-1 1 -1 1])
end
and to rotate the flower image 50 degrees using the rotation matrix. How would I go about doing this?

採用された回答

Roger Stafford
Roger Stafford 2017 年 11 月 4 日
編集済み: Roger Stafford 2017 年 11 月 4 日
(Corrected - At first erroneously I rotated in clockwise direction) r = 50; wr = w*cosd(r)-z*sind(r); zr = w*sind(r)+z*cosd(r); plot(wr,zr,’y-‘)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by