Borrar filtros
Borrar filtros

How to plot contours only inside ellips?

3 visualizaciones (últimos 30 días)
Akshay Kumar
Akshay Kumar el 14 de Nov. de 2016
Editada: Akshay Kumar el 14 de Nov. de 2016
a=4 %input('half of the ellips major axis')
b=3 %input('half of the ellips minor axis')
Mt=1 %input('torque')
G=80 %input('regidity modulus')
x=-a:0.01:a;
y=-b:0.01:b;
y1= b*(sqrt(1-(x/a).^2));
y2 = transpose(y);
w1=y2*x;
w= (Mt*(b^2 - a^2) * w1 )/(pi * a^3 * b^3 * G);
plot(x,y1,'w',x,-y1,'w');
hold on
contourf(x,y2,w,30)
colorbar
colormap(hot)

Respuestas (0)

Categorías

Más información sobre Contour Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by