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.
ผลลัพธ์ (
ซีบัวโน) 1:
[สำเนา]คัดลอก!
8. Opsyonal: Plot sa usa ka lingin. Kini dili diha-diha dayon klaro kon sa unsang paagi sa pagplano sa usa ka lingin sa Matlab. Isulat ang function [x, y] = getCircle (center, r) aron sa pagkuha sa mga x ug y coordinates sa usa ka lingin. Ang lingin kinahanglan nga nasentro sa center (2-elemento vector nga naglangkob sa mga x ug y mga hiyas sa tunga) ug radyos r. Bumalik x ug ysuch nga luna (x, y) ang nanagsabutsabut sa sa lingin.
x (t) = cos (t)
sa usa ka. Hinumdomi nga alang sa usa ka lingin sa sinugdanan (0,0), ang mosunod nga mga tinuod:, kay t sa YT () = ()
sa sala t
sa laing [0, 2D]. Karon, kamo lang sa sulbaron kon unsaon sa scale ug paghubad niini.
การแปล กรุณารอสักครู่..
