Hi all, I am new to MatLAB and may you help me to generate a spiral-shaped volume

2 次查看(过去 30 天)
Hi all
I want to model a battery cell and haven´t found the correct function to generate the height of my spiral. Simply adding a z coordinate with a fixed value as input for surf did not help.
So far it looks like this with spirals at the bottom:
The function I use looks like this:
b = 0.013;
r = 0.5+0.035;
t_fin =(r_c-g)/(b);
t = 0:pi/100:t_fin;
X = (r+b*t).*cos(t);
Y = (r+b*t).*sin(t);
plus plot ..
Thanks!

回答(1 个)

Adithya
Adithya 2023-9-5
Hello @Florian I understand from your question that you need assistance in generating the height componentfor modelling a battery cell using a spiral shape.
To generate the height of the spiral for modelling a battery cell, you can modify your code by introducing a varying z-coordinatebased on the height you desire.
By using meshgrid, we create a grid of coordinates for X, Y, and Z, where X and Y represent the spiral coordinates as before, and Z represents the varying height values.
Finally, the surf function is used to plot the spiral with the generated coordinates in 3D, including the height component.
Please note that you may need to adjust the parameters and ranges based on your specific requirements to achieve the desired appearance of the battery cell model.
You can refer to following documentation Battery Modelling
I hope this helps you. Let me know if you have any further questions!

类别

Help CenterFile Exchange 中查找有关 Mathematics and Optimization 的更多信息

标签

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by