Create combined polar coordinates function
Ältere Kommentare anzeigen
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
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Linear Algebra finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

