How can I plot staked cylinders?
Afficher commentaires plus anciens
I have a matrix in which the number of rows are timesteps, the number of columns is the number of cylinders and the values are the diametes of the cylinders for each timesteps. Cylinders have all the same heigh fixed.
What I need, and I can't figured out how to do it, is for each time step to plot the stacked cylinders with correct diameters (and then create a video of the evolution of this "storey-cake", but I can handle this part).
I attach part of the code to generate the matrix of the diameters.
Qt = [0 617 2469 5555 9876 15432 22222 30246 39506 50000 50000 44444 38888 33333 27777 22222 16666 11111 5555 0]
hf = -1.02*5+0.0148*(Qt*1000).^(0.4); % Total Height of the "storey-cake"
hf = round(hf,1);
hcil = 0.1; % Height of every storey
A = zeros(length(hf),round(max(hf)/hcil)); % Matrix of diameters
zvirt = -1.02*5+0.00524*(Qt*1000).^(0.4);
for i = 1:length(hf)
n = hf(i)/hcil;
for j = 1:n
A(i,j) = 5*(1-j*hcil/hf(i));
end
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Surface and Mesh Plots 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!
