Converting 2D plots into a 3D plot

3 ビュー (過去 30 日間)
Muhammad Arsal Akram
Muhammad Arsal Akram 2020 年 4 月 20 日
回答済み: Jyotsna Talluri 2020 年 4 月 23 日
I have total 4 arrays.
waterdepth = [] (10 values)
velocities = [] (corresponding to the 10 values of depths)
time=[] (10 values)
velocities = []=(corresponding to the 10 values of time)
I am able to plot two graphs seperately but I want to show how velocity is changing with both waterdepth and time in a single 3D plot.... How can I plot one?
  2 件のコメント
Tommy
Tommy 2020 年 4 月 20 日
Do the values in waterdepth correspond in any way to the values in time?
Muhammad Arsal Akram
Muhammad Arsal Akram 2020 年 4 月 20 日
Not really... For a fixed waterdepth I have 10 velocity values at 10 different time points
And at a fixed time point I have 10 different velocity values at 10 different depths
But as said, depths do not correspond to time in any way ...

サインインしてコメントする。

回答 (1 件)

Jyotsna Talluri
Jyotsna Talluri 2020 年 4 月 23 日
As you have 3 vectors waterdepth,time and velocities, you can plot a 3D scatter plot by making use of scatter3 function.
Refer to the documentation of scatter3 function

カテゴリ

Help Center および File ExchangeDiscrete Data Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by