Mostrar comentarios más antiguos
Im trying to convert a vector O in radian into x-coordinate vector and y-coordinate vector but Im encountering the problem below.
??? Error using ==> mpower Inputs must be a scalar and a square matrix.
Error in ==> Untitled4 at 22 r=[(a*b)/sqrt((b*cos(O))^2+(a*sin(O))^2)]; % ellipse in polar coordinates
npanels=3;
a=1.25; %major axis
b=0.75; %minor axis
O=[pi-pi/(2*npanels):-pi/(npanels):pi/(2*npanels)]; %boundary points in radian
r=[(a*b)/sqrt((b*cos(O))^2+(a*sin(O))^2)]; % ellipse in polar coordinates
x=rcos(O); %x-coordinate
y=rsin(O); %y-coordinate
Respuesta aceptada
Más respuestas (2)
Walter Roberson
el 8 de Mayo de 2011
r=(a*b)/sqrt((b*cos(O)).^2+(a*sin(O)).^2);
Yoon Hong Ng
el 8 de Mayo de 2011
0 votos
2 comentarios
Paulo Silva
el 8 de Mayo de 2011
same thing add a dot before the operation mentioned on the error
./ instead of /
Yoon Hong Ng
el 8 de Mayo de 2011
Categorías
Más información sobre Polar Plots en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!