Multiple polar plot in one figure

5 vues (au cours des 30 derniers jours)
Manish Kumar
Manish Kumar le 26 Fév 2019
Commenté : Manish Kumar le 26 Fév 2019
Dear All,
I am trying to plot multiple polar plot in one figure, just like the image shown below
I have made one script which can make only one polar plot at a time for the inputs C11, C22, C12, C66;
theta = 0:0.01:2*pi;
c=cos(theta);
s=sin(theta);
C11 = input('Enter value of c11 in N/m:');
C22 = input('Enter value of c22 in N/m:');
C12 =input('Enter value of c12 in N/m:');
C66 =input('Enter value of c66 in N/m:');
y = (C11*C22 - C12.^2)./((C11.*s.^4) + (C22.*c.^4) +((C11*C22 - C12.^2)/C66 - 2*C12).*c.^2.*s.^2);
polarplot(theta,y)
However i have 3 set of C11, C22, C12, C66, i want to plot them together. I am attching my data below in excel sheet. Kindly help.
  3 commentaires
Manish Kumar
Manish Kumar le 26 Fév 2019
I have tried the code below;
theta = 0:0.01:2*pi;
c=cos(theta);
s=sin(theta);
C11 = [314.127; 157.485; 155.944];
C22 = [314.609; 157.798; 156.038];
C12 =[64.253; 28.292; 36.88] ;
C66 =[124.974; 64.516; 59.618];
y = (C11.*C22 - C12.^2)./((C11.*s.^4) + (C22.*c.^4) +((C11.*C22 - C12.^2)/C66 - 2*C12).*c.^2.*s.^2);
polarplot(theta,y)
It is showing "Matrix dimensions must agree".
Manish Kumar
Manish Kumar le 26 Fév 2019
Formula is:
Screenshot (24).png

Connectez-vous pour commenter.

Réponse acceptée

KSSV
KSSV le 26 Fév 2019
theta = 0:0.01:2*pi;
c=cos(theta);
s=sin(theta);
C11 = [314.127; 157.485; 155.944];
C22 = [314.609; 157.798; 156.038];
C12 =[64.253; 28.292; 36.88] ;
C66 =[124.974; 64.516; 59.618];
y = zeros(3,length(c)) ;
for i = 1:3
y(i,:) = (C11(i).*C22(i) - C12(i).^2)./((C11(i).*s.^4) + ........
(C22(i).*c.^4) +((C11(i).*C22(i) - C12(i).^2)/C66(i) - 2*C12(i)).*c.^2.*s.^2);
end
polarplot(theta,y)
  1 commentaire
Manish Kumar
Manish Kumar le 26 Fév 2019
Thank you sir

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Polar Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by