Create combined polar coordinates function
이전 댓글 표시
Hello, I have been trying to solve for what angles my function r in polar coordinates cuts the unit circle and use the functions below to plot the solution. Now I am trying to come up with a function that given the input of a angle (x) gives the corresponding y value of the difference of the function and the unit circle so that I can calculate an exact solution with fzero. I am very confused on how to do this and been stuck on this for a while. Thanks in advance for any help.
%My function on a seperate script
function [x,y]=polarcoord(f)
theta=linspace(0,2*pi);
x=f(theta).*cos(theta);
y=f(theta).*sin(theta);
end
%Main script
r=@(x)(2+sin(3*x))./sqrt(1+exp(cos(x)));
[x,y]=polarcoord(r); %Main function
[X,Y]=polarcoord(@(x) 1); %Unit circle
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Linear Algebra에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

