MATLAB: How to plot the 4th dimension of an array 3d plotsgraphMATLABplotting Hi All, I retrieved a matrix that stores a variable called temp. The matrix is 4D. If I want to retrieve only the 4th column and plot it how can i do that? Best Answer threeD_array = permute( YourMatrix(:,4,:,:), [1 3 4 2]); %column 4But then you have the problem of how to plot a 3D array, as doing so requires a 4D plot -- X, Y, Z, and value. Related SolutionsMATLAB: 4th degree question ploting Try this:Ctg =[0.322; 0.122; 0.084; 0.053; 0.031; 0.01];t =[0; 20; 40; 60; 80; 100];plot(t, Ctg, 'ko', 'LineWidth', 2, 'MarkerSize', 15);hold on;% Estimate the coefficients for a 4th order polynomial.coefficients = polyfit(t, Ctg, 4)% Make a new xt = linspace(min(t), max(t), 1000);% 4th degree EquationR = coefficients(1)*t.^4 + coefficients(2)*t.^3 + coefficients(3)*t.^2 + coefficients(4)*t+ coefficients(5);plot(t, R, 'b-', 'LineWidth', 2);grid on; MATLAB: Plotting of a matrix with 3 dimension Hi Marc,You can separate the content on the first row and can store first value to vector x and other value to vector y and then you can use plot(x,y).Hope this Helps! Related Question4th order non linear differential equationReshape 3d to 2d array4th degree equations
Best Answer