Hello Richard,
I couldn't find detailed documentation for the "RegularizeData3D" function you mentioned. The Add-On page does not specify the output dimensions. However, after reviewing the function code and its behavior, it seems that the output size is xnodes * ynodes, where "xnodes" corresponds to "new_x" and "ynodes" corresponds to "new_y" in your query.
You should avoid directly swapping "new_x" and "new_y" in the code, as this might lead to incorrect output because "new_x" and "x" are related and "new_y" and "y" are related. If you need to adjust the output dimensions, consider transposing the output "new_z" to achieve the desired size.
For more information on how to transpose matrices in MATLAB, you can refer to the following documentation: https://www.mathworks.com/help/matlab/ref/transpose.html
I hope this helps!