Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Rotating an ellipse in matlab

Status
Not open for further replies.

dneda

Newbie level 2
Joined
Sep 27, 2010
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,293
So I have a two part assignment, the first part is to plot the ellipse for

a) (x^2/9)+(y^2/4) = 1

I think I did this right as when i do plot (x,y) it displays an ellipse

b) draw the ellipse obtained by rotating (x^2/9)+(y^2/4) = 1 30 degrees
counterclockwise.cheap autocad
I can't for the life of me find a rotate command. I was hoping I could just rotate the plot I got from part a but there is no command to do that. anyone have ideas?
 
Last edited:

If it is an assignment, then if you just rotate the plot, not doing the calculation, you'll definitely get zero :)
Anyways...

If you understand why did you get the correct result for you part a, then part b is simple.
You just need to convert you angle to radians (Remember pi radian = 180 degrees) and calculate the rotation matrix (i.e. [cos θ, -sinθ; sinθ, cosθ]).Then you'll simply do matrix multiplication of your original matrix (for x,y points) with this rotation matrix.

Result can be plot like you did in a.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top