Azzera filtri
Azzera filtri

How to plot contours only inside ellips?

3 visualizzazioni (ultimi 30 giorni)
Akshay Kumar
Akshay Kumar il 14 Nov 2016
Modificato: Akshay Kumar il 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)

Risposte (0)

Categorie

Scopri di più su Contour Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by