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

2 views (last 30 days)
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!

Answers (1)

Adithya
Adithya on 5 Sep 2023
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!

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!