Effacer les filtres
Effacer les filtres

How to plot contours only inside ellips?

3 vues (au cours des 30 derniers jours)
Akshay Kumar
Akshay Kumar le 14 Nov 2016
Modifié(e) : Akshay Kumar le 14 Nov 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)

Réponses (0)

Catégories

En savoir plus sur Contour Plots 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