how to draw an ellipse matrix?

5 vues (au cours des 30 derniers jours)
kitty varghese
kitty varghese le 20 Juil 2017
Modifié(e) : kitty varghese le 6 Août 2017
m = 800;
n = 600;
im = zeros(800, 600);
y0 = 12;
x0 = 12;
a = randi(round(m/3));
b = randi(round(n/3));
c = max(a, b);
c1=0.1;
theta = 2*pi*rand(1);
color = 249;
color2 = 120;
disp(i)
im = ellipseMatrix(y0, x0, a, b, theta, im, color, color2, randi(2));
colormap(gray(256));
image(im)
  2 commentaires
Jan
Jan le 6 Août 2017
What is your question? What is the problem? What is "ellipseMatrix"? Do you mean the FileExchange submission http://www.mathworks.com/matlabcentral/fileexchange/17499-ellipsematrix-y0--x0--a--b--theta--im--c1--c2--pinterp-?
kitty varghese
kitty varghese le 6 Août 2017
Modifié(e) : kitty varghese le 6 Août 2017
yes. i used FileExchange submission. I got the desired output. thanks.
m = 800;
n = 600;
im = zeros(m, n);
y0=400;
x0=300;
a=286;
b=60;
theta = pi/2;
color = 169;
color2 = round(color/3);
im= ellipseMatrix(y0, x0, a, b, theta, im, color, color2, randi(2));
colormap(gray(256));
image(im);

Connectez-vous pour commenter.

Réponse acceptée

Image Analyst
Image Analyst le 6 Août 2017
Modifié(e) : Image Analyst le 6 Août 2017

Plus de réponses (0)

Catégories

En savoir plus sur Modify Image Colors dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by