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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!