Borrar filtros
Borrar filtros

I need to plot an airfoil and it is just not looking right

1 visualización (últimos 30 días)
Chris
Chris el 4 de Sept. de 2014
Comentada: Joseph Cheng el 4 de Sept. de 2014
It should be easy since I am just plotting the points but it isnt working and this is a little bit beyond my matlab experience
x1 = [.0028 .0139 .0359 .0682 .1102 .1609 .2191 .2837 .3530 .4257 .5000 ...
.5743 .6470 .7163 .7809 .8391 .8898 .9318 .9641 .9861 .9972];
zu1 = [.0064 .0188 .0301 .0399 .0480 .0541 .0580 .0596 .0590 .0566 .0525 ...
.0471 .0410 .0343 .0275 .0209 .0147 .0093 .0050 .0020 .0004];
zl1 = [-.0064 -.0188 -.0301 -.0399 -.0480 -.0541 -.0580 -.0596 -.0590 -.0566 ...
-.0525 -.0471 -.0410 -.0343 -.0275 -.0209 -.0147 -.0093 -.0050 -.0020 -.0004];
ax=plotyy(x1,zl1,x1,zu1)
axis equal
axes(ax(2))
axis ij
When I plot it i get something vaugley wing shaped but its definitely not right.

Respuesta aceptada

Joseph Cheng
Joseph Cheng el 4 de Sept. de 2014
Editada: Joseph Cheng el 4 de Sept. de 2014
just curious why you are doing the plotyy?
ax=plot(x1,zl1,x1,zu1)
axis equal
should work just fine unless the y axis on zl1 and zu1 are not the same?
why it didn't look not right is that the y axis (left) and y axis (right) were not on the same scale.
  2 comentarios
Chris
Chris el 4 de Sept. de 2014
haha wow I am dumb. I was following what the teacher gave to us. I just put in regular plot and it works fine. I figured I was overthinking it. Thank you! This community is so great with dumb questions!
Joseph Cheng
Joseph Cheng el 4 de Sept. de 2014
No problem and glad to help! dumb questions are welcome because we all make them. Especially if you've been staring at the same bit of code for ages.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Two y-axis 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