How to create a waterfall plot with two matrices and a vector
古いコメントを表示
Hi,
Not sure if this is possible, but:
I want to create a waterfall plot from a set of data in the following format
X = [m x n]
Y = [m]
Z = [m x n]
So what i want is for the mth value in Y, i want to take the corresponding n row from X and plot it against the n row from Z. Then move onto the next value of m from Y, and plot X against Z etc.
So I end up with many plots of X vs Z along a Y-axis to form a waterfall.
How might i do this? The waterfall function only allows X to be a vector.
2 件のコメント
Azzi Abdelmalek
2013 年 3 月 6 日
Can you give an example of Y
Joseph Harris
2013 年 3 月 6 日
編集済み: Joseph Harris
2013 年 3 月 6 日
採用された回答
その他の回答 (1 件)
Azzi Abdelmalek
2013 年 3 月 6 日
Example
m=10;
n=40;
z= sort(rand(m , n),2)
y = randi(m,m,1)
x = rand(m, n)
xx=x(y,:)
zz=z(y,:)
plot(zz',xx')
カテゴリ
ヘルプ センター および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
