Hi I have a 3 dimensional matrix that I am trying to convert the rows to columns and then stack all the columns to generate a vector that will have the three dimensions.
therefore, row 1 becomes column 1, row 2 becomes column 2 etc. And then, column 2 goes under column 1, column 3 under column 1 and 2. I also need to keep the dimensions the same
PV_power_output(:,:,K) below is a 365 x 24 x 27 matrix, which should become a 8760x1 vector following the positioning sequence mentioned above
I am struggling with the coding of this
So far I have
PV_power_output(:,:,K) = real((Vmpp_(:,:,K).*Impp_(:,:,K))*inverter_efficiency)/1000;
permdims = 1 : ndims(PV_power_output);
out = reshape(permute(PV_power_output, permdims),8760,1,[]);
However, on checking the elements in different positions, the above is incorrect and so any help would be great!