performance - Matlab: How to speed up integration (int) for computing Arc lengths? -
as part of code build geometry meshing, calculating 2d arc lengths integration. below sample code that:
fun=@(ss)integral(@(t)sqrt((r0+a1*cos(1*t)+a2*cos(2*t)+a3*cos(3*t)+a4*cos(4*t)+a5*cos(5*t)+a6*cos(6*t)+a7*cos(7*t)+a8*cos(8*t)).^2 ... + (-a1*1*sin(1*t)-a2*2*sin(2*t)-a3*3*sin(3*t)-a4*4*sin(4*t)-a5*5*sin(5*t)-a6*6*sin(6*t)-a7*7*sin(7*t)-a8*8*sin(8*t)).^2),0,ss);
integration on 't' , other parameters constant (i.e. r0, a1, etc)
but integration takes long time, , since try many different geometries great if can find way around speed integration takes bit long.
how can compute same integral in more quicker way?
Comments
Post a Comment