How can you save a 1 by 3 array in each position of a 4D array?
I am working on an interpolation project where I have 4 variables, each representing a dimension of a 4D array. There are three seperate values that coincide with each coordinate of the 4 dimensional array. The only way I have been able to make this work so far is that I currently have 3 seperate 4D arrays, each with the same set of variables but with one of the 3 values stored at each coordinate. The issue is that this creates a lot of reduntanat data and significantly increases the file size, while also increasing the computational resource requirement by running the interpolation 3 seperate times. I would like to only have one 4D array, with each coordinate housing a 1×3 with all 3 data points needed. Is this possible? If so, what is the best approach? I have approached this using Cell arrays, but I still run into errors of trying to assign 1×3 in a 1×1 space or with trying to assign doubles in the cell array.I am working on an interpolation project where I have 4 variables, each representing a dimension of a 4D array. There are three seperate values that coincide with each coordinate of the 4 dimensional array. The only way I have been able to make this work so far is that I currently have 3 seperate 4D arrays, each with the same set of variables but with one of the 3 values stored at each coordinate. The issue is that this creates a lot of reduntanat data and significantly increases the file size, while also increasing the computational resource requirement by running the interpolation 3 seperate times. I would like to only have one 4D array, with each coordinate housing a 1×3 with all 3 data points needed. Is this possible? If so, what is the best approach? I have approached this using Cell arrays, but I still run into errors of trying to assign 1×3 in a 1×1 space or with trying to assign doubles in the cell array. I am working on an interpolation project where I have 4 variables, each representing a dimension of a 4D array. There are three seperate values that coincide with each coordinate of the 4 dimensional array. The only way I have been able to make this work so far is that I currently have 3 seperate 4D arrays, each with the same set of variables but with one of the 3 values stored at each coordinate. The issue is that this creates a lot of reduntanat data and significantly increases the file size, while also increasing the computational resource requirement by running the interpolation 3 seperate times. I would like to only have one 4D array, with each coordinate housing a 1×3 with all 3 data points needed. Is this possible? If so, what is the best approach? I have approached this using Cell arrays, but I still run into errors of trying to assign 1×3 in a 1×1 space or with trying to assign doubles in the cell array. array, cell array, matrices, double MATLAB Answers — New Questions









