8. Optional: Plot a circle. It’s not immediately obvious how to plot a circle in Matlab. Write the function [x,y]=getCircle(center,r) to get the x and y coordinates of a circle. The circle should be centered at center (2-element vector containing the x and y values of the center) and have radius r. Return x and ysuch that plot(x,y)will plot the circle.
x (t )= cos (t )
a. Recall that for a circle at the origin (0,0), the following is true: , for t on yt () = ()
sin t
the range [0, 2ð] . Now, you just have to figure out how to scale and translate it.
8. เลือก: พล็อตเป็นวงกลม มันไม่ได้ชัดเจนทันทีวิธีการลงจุดวงกลมใน Matlab เขียนฟังก์ชัน [x,y]=getCircle(center,r) รับ x และพิกัด y ของวงกลม ควรแปลกวงกลมที่ศูนย์ (เวกเตอร์ 2-องค์ประกอบที่ประกอบด้วย x และ y ค่าของศูนย์) และมีรัศมีอาร์คืน x และ ysuch ที่ลงจุด (x, y) จะลงจุดวงกลม.
x (t) = cos (t)
นึกว่า สำหรับวงกลมที่จุดเริ่มต้น (0,0), ต่อไปนี้เป็นจริง:, สำหรับ t (yt) =()
sin t
ช่วง [0, 2ð] ตอนนี้ เพียงได้คิดหาวิธีการปรับขนาด และแปลนั้น
การแปล กรุณารอสักครู่..
