MATLAB Answers

How can I rotate an ellipse randomly

17 views (last 30 days)
Emma
Emma on 3 Mar 2021
Edited: Walter Roberson on 3 Mar 2021
This is what I have written so far
t = linspace(0,2*pi)
x = randn + randn*cos(t)
rng('shuffle');
y = randn + randn*sin(t);
plot(x,y)
I want to create random rotation for this ellipse each time I plot it while keeping this same code I have written so far.
  2 Comments
Emma
Emma on 3 Mar 2021
sorry one more question. I am very new to matlab so what exactly would you type to rotate randomly around (xc,yc)? And how do you inetgrate it into the code you wrote?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by