Depending on your data, you have a couple of options. I personally recommend the "squeeze" function, but someone else has asked this question as well. See my comments below.
- This has been asked before (https://www.mathworks.com/matlabcentral/answers/218519-converting-a-3d-data-into-2d) and it will depend on what your data looks like. If your data is a 1x1xn array where n is any real positive number, the squeeze function will get you there.
- If you are needing to do calculations per individual row, you are going to have to index and use for loops to handle the data. This should be a quick thing if you can get a function built to calculate per row and then just call the function to calculate each row.