Clear Filters
Clear Filters

Area / radius of truncated cone

11 views (last 30 days)
BoostedMan
BoostedMan on 6 Oct 2021
Answered: Balavignesh on 24 May 2024
So i have to put 6, 16, and 60 cylinders into my cone and then use them to get the elongation, I already have most of it I just can't figure out how to find the changing radius for each cylinder. for area adn radius I have:
for i=1:n
r(i) = r./n
A(i) = pi*(r(i))^2
I know radius is wrong but I cant seem to figure out what to put there, it also says wrong number of elements for the raius I am just lost.
Any help is appreciated!
Update: I change my radius to: (original radius is 2c) and changing radius of cone is ((R2-R2)/h)H (b=thickness=L./N
L(i) = (1/2)*(b(i))
r(i) = r(i) = ((2*c-c)/L)*L(i)
but now it says my radius equation either matrix dimensions need to agree, or when i put a '.' it says left and right different number of elements(still not sure if radius eq. is correct),

Answers (1)

Balavignesh
Balavignesh on 24 May 2024
Hi BoostedMan,
It is my understanding that you are trying to calculate the radius at different heights within a cone, dividing the cone into cylinders with varying radii. If the total height of the cone is 'H', and the radius at the base is 'R', then the radius 'r' at any height 'h' from the tip is proportional to 'h', as 'r = (R/H)*h'.
If you're dividing the cone into 'n' horizontal segments (cylinders), each with its own height 'h_i' measured from the tip, and you want to find the radius 'r_i' for each segment, you can use this proportionality. It looks like you're also trying to calculate the area of each cylinder's base.
The following code should correctly calculate the radii and areas for each segment of the cone. Make sure 'R' and 'H' are set to the actual dimensions of your cone.
% Assuming R (radius of the cone's base) and H (height of the cone) are given
R = 2; % Example value
H = 10; % Example value
n = 6; % Number of segments
% Preallocate arrays for efficiency
r = zeros(1, n);
A = zeros(1, n);
for i = 1:n
h_i = (H/n) * i; % Height from the tip for the i-th segment
r(i) = (R / H) * h_i; % Radius at height h_i
A(i) = pi * (r(i))^2; % Area of the i-th segment's base
end
% Display the results
disp('Radii of each segment:');
Radii of each segment:
disp(r);
0.3333 0.6667 1.0000 1.3333 1.6667 2.0000
disp('Area of each segment:');
Area of each segment:
disp(A);
0.3491 1.3963 3.1416 5.5851 8.7266 12.5664
Kindly have a look at the following documentation links to have more understanding on:
Hope that helps!
Balavignesh

Products


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!