How to plot a 4D matrix, variable-by-variable?
조회 수: 2 (최근 30일)
이전 댓글 표시
I have a 4D matrix of a mathematical function of the form R(x,y,z,t). I want to plot a variety of different things on 2D plots using the plot function. I want to plot a graph of R vs. x at a specified y,z and t. In other words:
plot(R(:,35,1,1))
This command works fine and it outputs a figure showing all the x-coordinates through the planes y=35,z=1 and t=1.
I've done the same thing for R vs. y: plot(R(35,:,1,1)).
However, what I REALLY want to do is make a plot of R vs. t. This graph would show the variation in R through time at a specific point P(x,y,z).
So I tried using plot:
plot(R(35,35,1,:))
but I get an error saying: Error using plot Data may not have more than 2 dimensions
Is there a simple solution to plot R vs t given a 4D matrix?
Thanks
댓글 수: 0
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Line Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!