Simulink 3D matrix interpolation using pre-lookups
I have a 3D (6x5x2) matrix. I’d like to interpolate between ‘surfaces’ along the 3d dimension. To better visualize the problem, one can think of it as a plate with 2 stacked pankaces (each a 6×5 matrix (surface)). I’d like to make a new 5×6 pancake by interpolating between the two stacekd pancakes (along the 3rd dimesion). This needs to be done in Simulink.
I started off by using Matrix Interpolation (MI) block but I realized it would perhaps be more efficient if I directly use pre-lookups + interpolation-using-pre-lookups. See the example below including the .slx file.
In the pre-lookups, for the first 2 dimensions (5×6 –> k1,f1 and k2,f2), I’m enforcing all breakpoints to grab the entire ‘surface’ and simply use the 3rd dimension (x2) to interpolate between the ‘surfaces’. I’m getting port 2 dimension error which I’d appreciate some help to debug.
I’ve also tried using ‘Number of sub-table selection dimensions’ as shows in the second picture below and no success.
I wonder, there should be easier ways of acheiving this given that this is a rather simple operation (interpolation between surfaces)I have a 3D (6x5x2) matrix. I’d like to interpolate between ‘surfaces’ along the 3d dimension. To better visualize the problem, one can think of it as a plate with 2 stacked pankaces (each a 6×5 matrix (surface)). I’d like to make a new 5×6 pancake by interpolating between the two stacekd pancakes (along the 3rd dimesion). This needs to be done in Simulink.
I started off by using Matrix Interpolation (MI) block but I realized it would perhaps be more efficient if I directly use pre-lookups + interpolation-using-pre-lookups. See the example below including the .slx file.
In the pre-lookups, for the first 2 dimensions (5×6 –> k1,f1 and k2,f2), I’m enforcing all breakpoints to grab the entire ‘surface’ and simply use the 3rd dimension (x2) to interpolate between the ‘surfaces’. I’m getting port 2 dimension error which I’d appreciate some help to debug.
I’ve also tried using ‘Number of sub-table selection dimensions’ as shows in the second picture below and no success.
I wonder, there should be easier ways of acheiving this given that this is a rather simple operation (interpolation between surfaces) I have a 3D (6x5x2) matrix. I’d like to interpolate between ‘surfaces’ along the 3d dimension. To better visualize the problem, one can think of it as a plate with 2 stacked pankaces (each a 6×5 matrix (surface)). I’d like to make a new 5×6 pancake by interpolating between the two stacekd pancakes (along the 3rd dimesion). This needs to be done in Simulink.
I started off by using Matrix Interpolation (MI) block but I realized it would perhaps be more efficient if I directly use pre-lookups + interpolation-using-pre-lookups. See the example below including the .slx file.
In the pre-lookups, for the first 2 dimensions (5×6 –> k1,f1 and k2,f2), I’m enforcing all breakpoints to grab the entire ‘surface’ and simply use the 3rd dimension (x2) to interpolate between the ‘surfaces’. I’m getting port 2 dimension error which I’d appreciate some help to debug.
I’ve also tried using ‘Number of sub-table selection dimensions’ as shows in the second picture below and no success.
I wonder, there should be easier ways of acheiving this given that this is a rather simple operation (interpolation between surfaces) simulink, interpolation, pre-lookup, lookup MATLAB Answers — New Questions