I have a dataset where the first column specifies the angle and the second one the radius. I need to know the function that calculates the radius as a function of theta. I want to use this function as an input for the symbolic function INT, like in the example 'f' below. The aim is to find the (numerical) area of a shape parameterized by θ evaluating the definite integral over θ between the limits 0 and 2*pi.
data = importdata('hz.data');data = fliplr(data);data(:, 1) = data(:, 1).*(pi/180);syms r theta f% example function
f = 2*theta^2+3*theta^3+6*theta -12;Area = eval(int(int(r,r,0, f), theta, 0, 2*pi));
Best Answer