Similar lines are much different in time for run due to MATLAB profiler.
2 views (last 30 days)
The right hand side of all of below equation are numbers (in same order of magnitude) but the first line is much slower. Any idea why this is happening? The image of profile is also attached.
Fangjun Jiang on 13 Jan 2022
It takes time to create "Comp" as a structure. Add the line below first and then profile again.