When to transpose an m*n matrix extracted from a multi dimensional matrix for use with surf command

2 次查看(过去 30 天)
Folks,
I have an equation which is a fn of 5 variables. This results in an 5-Dimensional matrix Output=f(a,b,c,d,e) when i define it inside a multi for loop of 5.
I use the squeeze function to plot desired quantities, eg
surf(a,b, squeeze(output(:,:,1,1,1)
surf(b,c, squeeze(output(1,:,:,1,1)
surf(c,d, squeeze(output(1,1,:,:,1)
surf(a,d, squeeze(output(:,1,1,:,1)
surf(a,e, squeeze(output(:,1,1,1,:)
The problem is some of these results from the squeeze command are rows rather than vectors and thus the matching of the 2 inputs with the corresponding output is not correct when plotting the surfaces. Any idea how i correct this? Thanks in advance.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by