Create combined polar coordinates function
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Linear Algebra dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

